diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2020-02-27 10:49:14 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-03-02 10:35:50 +0100 |
commit | 8ab237edf170f5b0482dccf5169868e5c7c47771 (patch) | |
tree | cca2d3faa0a8553a452d9139ac7442c3da25c0f8 /tools/qmlimportscanner | |
parent | d8f6f41c334d14c4712b1dc16554f80bb1290e24 (diff) |
Restore offset/length in QQmlJS::DiagnosticMessage
This is needed in a few places outside of declarative, so this change
restores the loc member in DiagnosticMessage and moves
QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory.
QQmlError is unaffected and retains only line/column.
Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb
Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmlimportscanner')
-rw-r--r-- | tools/qmlimportscanner/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp index b563d7df95..e5d43a8e89 100644 --- a/tools/qmlimportscanner/main.cpp +++ b/tools/qmlimportscanner/main.cpp @@ -277,7 +277,7 @@ QVariantList findQmlImportsInQmlCode(const QString &filePath, const QString &cod const auto diagnosticMessages = parser.diagnosticMessages(); for (const QQmlJS::DiagnosticMessage &m : diagnosticMessages) { std::cerr << QDir::toNativeSeparators(filePath).toStdString() << ':' - << m.line << ':' << m.message.toStdString() << std::endl; + << m.loc.startLine << ':' << m.message.toStdString() << std::endl; } return QVariantList(); } |