aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/main.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-09-30 11:39:23 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-09-30 12:48:57 +0200
commit6b33e7cff321ea549ce49dfc06e92a520159ad92 (patch)
tree100452df4f7810de0a67d095a9de2128a74e5d22 /tools/qmllint/main.cpp
parent43eca45b061fe965fe2a6f1876d4a35a58e3a9e4 (diff)
qmllint: Don't leak the QQmlJSTypeInfo object
We want it to be mutable even where Codegen itself is const. Therefore, it needs to live outside Codegen. Change-Id: Ie4997118a1fdf8d60bd5670baa506ed0bfb98bad Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'tools/qmllint/main.cpp')
-rw-r--r--tools/qmllint/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp
index aa1158fff1..76faa1f601 100644
--- a/tools/qmllint/main.cpp
+++ b/tools/qmllint/main.cpp
@@ -185,7 +185,8 @@ static bool lint_file(const QString &filename, const bool silent, QJsonArray *js
parser.rootNode()->accept(&v);
success = v.check();
- Codegen codegen { &importer, filename, qmltypesFiles, &logger, code };
+ QQmlJSTypeInfo typeInfo;
+ Codegen codegen { &importer, filename, qmltypesFiles, &logger, &typeInfo, code };
QQmlJSSaveFunction saveFunction = [](const QV4::CompiledData::SaveableUnitPointer &,
const QQmlJSAotFunctionMap &,
QString *) { return true; };