aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmltc
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-04-27 09:19:54 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-04-28 14:16:35 +0200
commit858ebd66795f2cf1a072b9f7bc756bae0a872966 (patch)
treef1a86c777f2d3661feadcdc6d1301e3529834071 /tools/qmltc
parentb3e8a32e716dc25d1f0f60d610b5bda01d79c078 (diff)
Move literal types check out of QQmlJSTypeResolver
The type resolver should not do any semantic analysis on its own. This fixes a bug triggered by invoking the literal type analysis from qmlcachegen (which is not interested in literal bindings at all). While this doesn't fix the root cause, qmlcachegen will definitely not crash in this place anymore. There will be a follow-up bug to figure out what is actually happening. Fixes: QTBUG-102598 Change-Id: Ic5b1f1cdebc960e0ec56f54d8bdd11bac08f0521 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit dc815b797cfb20a2461167a1f4ac74adef1a5023)
Diffstat (limited to 'tools/qmltc')
-rw-r--r--tools/qmltc/prototype/typeresolver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qmltc/prototype/typeresolver.cpp b/tools/qmltc/prototype/typeresolver.cpp
index 377787830e..25d340afe7 100644
--- a/tools/qmltc/prototype/typeresolver.cpp
+++ b/tools/qmltc/prototype/typeresolver.cpp
@@ -30,6 +30,7 @@
#include "prototype/visitor.h"
#include <private/qqmljsimporter_p.h>
+#include <private/qqmljsliteralbindingcheck_p.h>
#include <private/qv4value_p.h>
#include <QtCore/qqueue.h>
@@ -50,6 +51,10 @@ TypeResolver::TypeResolver(QQmlJSImporter *importer)
void TypeResolver::init(Visitor &visitor, QQmlJS::AST::Node *program)
{
QQmlJSTypeResolver::init(&visitor, program);
+
+ QQmlJSLiteralBindingCheck literalCheck;
+ literalCheck.run(&visitor, this);
+
m_root = visitor.result();
QQueue<QQmlJSScope::Ptr> objects;