summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/qml/qmlengineutils.cpp
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2021-12-06 09:44:24 +0100
committerFawzi Mohamed <fawzi.mohamed@qt.io>2022-03-21 09:32:29 +0000
commit6b270b8dc959f0be83702947b4efe916f83f8978 (patch)
tree01196fd8847558479d566068ebcbb95b35599deb /src/plugins/debugger/qml/qmlengineutils.cpp
parent9d1fe1df14f9fcd5443d4d4e5a5c869419a1c793 (diff)
downloadqt-creator-6b270b8dc959f0be83702947b4efe916f83f8978.tar.gz
qmljs: correctly handle js string templates
In most cases we do want to visit the expressions in a function template. Changing its accept0 would force those not wanting to visit it to iterate on the templates (currently a linked list), so we add a visit method explicitly visiting the expression in all the needed places. Fixes: QTCREATORBUG-21869 Change-Id: I47733544bfd32eec357810b97242608b8f7de572 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengineutils.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlengineutils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/debugger/qml/qmlengineutils.cpp b/src/plugins/debugger/qml/qmlengineutils.cpp
index f7e22d127a..5b5bef2a86 100644
--- a/src/plugins/debugger/qml/qmlengineutils.cpp
+++ b/src/plugins/debugger/qml/qmlengineutils.cpp
@@ -158,6 +158,11 @@ public:
return true;
}
+ bool visit(TemplateLiteral *ast) override
+ {
+ Node::accept(ast->expression, this);
+ return true;
+ }
bool visit(VariableStatement *ast) override { test(ast); return true; }
bool visit(VariableDeclarationList *ast) override { test(ast); return true; }
bool visit(ExpressionStatement *ast) override { test(ast); return true; }