aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlcompiler.cpp')
-rw-r--r--src/qml/qml/qqmlcompiler.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp
index 0462c0b61a..58495bb1bf 100644
--- a/src/qml/qml/qqmlcompiler.cpp
+++ b/src/qml/qml/qqmlcompiler.cpp
@@ -3649,11 +3649,11 @@ bool QQmlCompiler::completeComponentBuild()
}
if (!compileState->functionsToCompile.isEmpty()) {
- JSCodeGen jsCodeGen;
-
const QString &sourceCode = jsEngine->code();
AST::UiProgram *qmlRoot = parser.qmlRoot();
+ JSCodeGen jsCodeGen(unit->finalUrlString(), sourceCode, jsModule.data(), jsEngine, qmlRoot);
+
JSCodeGen::ObjectIdMapping idMapping;
if (compileState->ids.count() > 0) {
idMapping.reserve(compileState->ids.count());
@@ -3665,8 +3665,7 @@ bool QQmlCompiler::completeComponentBuild()
}
}
- const QVector<int> runtimeFunctionIndices = jsCodeGen.generateJSCodeForFunctionsAndBindings(unit->finalUrlString(), sourceCode, jsModule.data(), jsEngine,
- qmlRoot, compileState->root->astNode,
+ const QVector<int> runtimeFunctionIndices = jsCodeGen.generateJSCodeForFunctionsAndBindings(compileState->root->astNode,
compileState->functionsToCompile,
idMapping);
compileState->runtimeFunctionIndices = runtimeFunctionIndices;