summaryrefslogtreecommitdiff
path: root/src/qdoc/qmlcodeparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/qmlcodeparser.cpp')
-rw-r--r--src/qdoc/qmlcodeparser.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp
index 437bcfd21..5539d5b80 100644
--- a/src/qdoc/qmlcodeparser.cpp
+++ b/src/qdoc/qmlcodeparser.cpp
@@ -147,9 +147,14 @@ void QmlCodeParser::parseSourceFile(const Location& location, const QString& fil
<< "The output is incomplete.";
}
}
- foreach (const QQmlJS::DiagnosticMessage &msg, parser->diagnosticMessages()) {
- qDebug().nospace() << qPrintable(filePath) << ':' << msg.loc.startLine
- << ": QML syntax error at col " << msg.loc.startColumn
+ foreach (const QQmlJS::DiagnosticMessage &msg, parser->diagnosticMessages()) {
+ qDebug().nospace() << qPrintable(filePath) << ':'
+#if Q_QML_PRIVATE_API_VERSION < 5
+ << msg.loc.startLine << ": QML syntax error at col "
+ << msg.loc.startColumn
+#else
+ << msg.line << ": QML syntax error at col " << msg.column
+#endif
<< ": " << qPrintable(msg.message);
}
currentFile_.clear();