summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-03-04 06:45:26 +0100
committerChristian Stenger <christian.stenger@qt.io>2020-03-04 08:22:12 +0000
commit33b091bd40187449a3e925659ae0738786e09de3 (patch)
tree31dcc8e5f11f3a38842a20c420195552266b730d /tests
parent37abf3beb54368db6f5491b9243355640fc53408 (diff)
downloadqt-creator-33b091bd40187449a3e925659ae0738786e09de3.tar.gz
QmlJS: Fix compile
..in general, with tests, and when using a namespaced Qt. Amends b09a48599e7. Change-Id: I99e275e10df5eed741d021911a360457f0d0d2e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/codemodel/check/tst_check.cpp2
-rw-r--r--tests/tools/qml-ast2dot/main.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qml/codemodel/check/tst_check.cpp b/tests/auto/qml/codemodel/check/tst_check.cpp
index 0c3ba465fc..8a52fd0ced 100644
--- a/tests/auto/qml/codemodel/check/tst_check.cpp
+++ b/tests/auto/qml/codemodel/check/tst_check.cpp
@@ -134,7 +134,7 @@ void tst_Check::test()
const QRegExp messagePattern(" (\\d+) (\\d+) (\\d+)");
QList<Message> expectedMessages;
- foreach (const AST::SourceLocation &comment, doc->engine()->comments()) {
+ foreach (const SourceLocation &comment, doc->engine()->comments()) {
const QString text = doc->source().mid(comment.begin(), comment.end() - comment.begin());
if (messagePattern.indexIn(text) == -1)
diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp
index 98875b81a6..6ffd8c11b3 100644
--- a/tests/tools/qml-ast2dot/main.cpp
+++ b/tests/tools/qml-ast2dot/main.cpp
@@ -154,7 +154,7 @@ protected: // visiting functions:
else
terminal(ast->fileNameToken);
- terminal(ast->versionToken);
+ terminal(ast->version->firstSourceLocation());
terminal(ast->asToken);
terminal(ast->importIdToken);
terminal(ast->semicolonToken);
@@ -299,6 +299,9 @@ protected: // visiting functions:
virtual bool visit(DebuggerStatement *ast) { terminal(ast->debuggerToken); terminal(ast->semicolonToken); return false; }
virtual bool visit(UiParameterList *ast) { terminal(ast->commaToken); terminal(ast->identifierToken); nonterminal(ast->next); return false; }
+ void throwRecursionDepthError() override {
+ qWarning() << "Reached maximum recursion depth.";
+ }
private:
QHash<Node *, QByteArray> _id;
QList<QPair<QByteArray, QByteArray> > _connections;