aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-01-23 14:14:47 +0100
committerLars Knoll <lars.knoll@qt.io>2018-01-28 16:37:30 +0000
commit6ef66a5dfe938a23c67c0aef0d6c7ebc98b8cca8 (patch)
treee4a1d343302d981b31fc4ebd22e0b6e88fc12c16 /src/qml/jsruntime/qv4script.cpp
parente5b157275d7b924e1a0f39d27958a7ad1eed9cef (diff)
Remove private API dependency of qmlcachegen generated code
Since the compilation unit does not have a backend anymore, we can create it in QtQml itself instead of in generated stub code. That removes the last dependency to private headers in the generated code. Change-Id: I186fc5bd679476b1a4714e4e3ba0ac00b55676cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index caddf0a3e0..70ea022fe6 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -226,7 +226,7 @@ Script *Script::createFromFileOrCache(ExecutionEngine *engine, QmlContext *qmlCo
{
if (const QQmlPrivate::CachedQmlUnit *cachedUnit = QQmlMetaType::findCachedCompilationUnit(originalUrl)) {
QQmlRefPointer<QV4::CompiledData::CompilationUnit> jsUnit;
- jsUnit.adopt(cachedUnit->createCompilationUnit());
+ jsUnit.adopt(new QV4::CompiledData::CompilationUnit(cachedUnit->qmlData));
return new QV4::Script(engine, qmlContext, jsUnit);
}