aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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-27 15:29:24 +0200
commitdc815b797cfb20a2461167a1f4ac74adef1a5023 (patch)
tree0a2870632fef1af716d56de08209c7e30b833784 /tools
parent3265013769b566039436358ae7762916ffa88628 (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. Pick-to: 6.3 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>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltc/qmltctyperesolver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qmltc/qmltctyperesolver.cpp b/tools/qmltc/qmltctyperesolver.cpp
index 2d46cf38b3..faf2b431e4 100644
--- a/tools/qmltc/qmltctyperesolver.cpp
+++ b/tools/qmltc/qmltctyperesolver.cpp
@@ -29,6 +29,7 @@
#include "qmltctyperesolver.h"
#include <private/qqmljsimporter_p.h>
+#include <private/qqmljsliteralbindingcheck_p.h>
#include <private/qv4value_p.h>
#include <QtCore/qqueue.h>
@@ -41,6 +42,10 @@ Q_LOGGING_CATEGORY(lcTypeResolver2, "qml.qmltc.typeresolver", QtInfoMsg);
void QmltcTypeResolver::init(QmltcVisitor &visitor, QQmlJS::AST::Node *program)
{
QQmlJSTypeResolver::init(&visitor, program);
+
+ QQmlJSLiteralBindingCheck literalCheck;
+ literalCheck.run(&visitor, this);
+
m_root = visitor.result();
QQueue<QQmlJSScope::Ptr> objects;