diff options
Diffstat (limited to 'src/qml/qml/qqmlscript.cpp')
-rw-r--r-- | src/qml/qml/qqmlscript.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlscript.cpp b/src/qml/qml/qqmlscript.cpp index c24891f6d6..7e3a23b489 100644 --- a/src/qml/qml/qqmlscript.cpp +++ b/src/qml/qml/qqmlscript.cpp @@ -1317,13 +1317,15 @@ bool QQmlScript::Parser::parse(const QString &qmlcode, const QByteArray & /* pre QQmlJS::Parser parser(&data->engine); - if (! parser.parse() || !_errors.isEmpty()) { + if (! parser.parse() || !parser.diagnosticMessages().isEmpty()) { // Extract errors from the parser foreach (const DiagnosticMessage &m, parser.diagnosticMessages()) { - if (m.isWarning()) + if (m.isWarning()) { + qWarning("%s:%d : %s", qPrintable(_scriptFile), m.loc.startLine, qPrintable(m.message)); continue; + } QQmlError error; error.setUrl(url); |