From 8ab237edf170f5b0482dccf5169868e5c7c47771 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 27 Feb 2020 10:49:14 +0100 Subject: 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 --- tests/auto/shared/qqmljsastdumper.cpp | 2 +- tests/auto/shared/qqmljsastdumper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/shared') diff --git a/tests/auto/shared/qqmljsastdumper.cpp b/tests/auto/shared/qqmljsastdumper.cpp index 8a50e021f6..5da6be6bd0 100644 --- a/tests/auto/shared/qqmljsastdumper.cpp +++ b/tests/auto/shared/qqmljsastdumper.cpp @@ -216,7 +216,7 @@ QString AstDumper::qs(const QStringRef &s) { return qs(s.toString()); } -QString AstDumper::loc(const AST::SourceLocation &s) { +QString AstDumper::loc(const SourceLocation &s) { if (noLocations() || !s.isValid()) return QLatin1String("\"\""); else { diff --git a/tests/auto/shared/qqmljsastdumper.h b/tests/auto/shared/qqmljsastdumper.h index d8d19e351d..5e46e516f0 100644 --- a/tests/auto/shared/qqmljsastdumper.h +++ b/tests/auto/shared/qqmljsastdumper.h @@ -91,7 +91,7 @@ public: QString qs(const char *s); QString qs(const QStringRef &s); - QString loc(const AST::SourceLocation &s); + QString loc(const SourceLocation &s); QString boolStr(bool v); -- cgit v1.2.3