Changeset View
Changeset View
Standalone View
Standalone View
src/kdeclarative/qmlobject.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 57 | public: | |||
---|---|---|---|---|---|
95 | QQmlContext *rootContext; | 95 | QQmlContext *rootContext; | ||
96 | bool delay : 1; | 96 | bool delay : 1; | ||
97 | }; | 97 | }; | ||
98 | 98 | | |||
99 | void QmlObjectPrivate::errorPrint(QQmlComponent *component) | 99 | void QmlObjectPrivate::errorPrint(QQmlComponent *component) | ||
100 | { | 100 | { | ||
101 | QString errorStr = QStringLiteral("Error loading QML file.\n"); | 101 | QString errorStr = QStringLiteral("Error loading QML file.\n"); | ||
102 | if (component->isError()) { | 102 | if (component->isError()) { | ||
103 | QList<QQmlError> errors = component->errors(); | 103 | const QList<QQmlError> errors = component->errors(); | ||
104 | foreach (const QQmlError &error, errors) { | 104 | for (const QQmlError &error : errors) { | ||
105 | errorStr += (error.line() > 0 ? QString(QString::number(error.line()) + QLatin1String(": ")) : QLatin1String("")) | 105 | errorStr += (error.line() > 0 ? QString(QString::number(error.line()) + QLatin1String(": ")) : QLatin1String("")) | ||
106 | + error.description() + QLatin1Char('\n'); | 106 | + error.description() + QLatin1Char('\n'); | ||
107 | } | 107 | } | ||
108 | } | 108 | } | ||
109 | qWarning() << component->url().toString() << '\n' << errorStr; | 109 | qWarning() << component->url().toString() << '\n' << errorStr; | ||
110 | } | 110 | } | ||
111 | 111 | | |||
112 | void QmlObjectPrivate::execute(const QUrl &source) | 112 | void QmlObjectPrivate::execute(const QUrl &source) | ||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |