aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-10-05 14:17:05 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2018-11-01 15:07:01 +0000
commit8b418d9be73dafd25c9c528127274a3573f1a7e1 (patch)
treef5901f8cf6e9a23caadbf5ba6fc4c3329b9823c7 /tools
parentfd3cf7a45ad5abf269aecc63dc164d9bd0f1b407 (diff)
Clone ContextType::Global as ContextType::ScriptImportedByQML
Add new enum value QV4::Compiler::ContextType::ScriptImportedByQML, which behaves exactly the same as ContextType::Global. A follow-up patch will change the behavior slightly. Task-number: QTBUG-69408 Change-Id: I20d27804fd1433f2229704546bcd78a0ac108c01 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/qmlcachegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp
index 762f6e7221..1805dde5d2 100644
--- a/tools/qmlcachegen/qmlcachegen.cpp
+++ b/tools/qmlcachegen/qmlcachegen.cpp
@@ -319,7 +319,7 @@ static bool compileJSFile(const QString &inputFileName, const QString &inputFile
&irDocument.jsGenerator.stringTable, illegalNames);
v4CodeGen.setUseFastLookups(false); // Disable lookups in non-standalone (aka QML) mode
v4CodeGen.generateFromProgram(inputFileName, inputFileUrl, sourceCode, program,
- &irDocument.jsModule, QV4::Compiler::ContextType::Global);
+ &irDocument.jsModule, QV4::Compiler::ContextType::ScriptImportedByQML);
QList<QQmlJS::DiagnosticMessage> jsErrors = v4CodeGen.errors();
if (!jsErrors.isEmpty()) {
error->appendDiagnostics(inputFileName, jsErrors);