aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-23 10:40:41 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-31 05:13:48 +0000
commite56eeee9902ffc341506040e637654b2b0451209 (patch)
treeb316f49506739e96e85dfe25bb7759703bcb95f7 /src/qml/qml/qqmlobjectcreator.cpp
parent4ac9cf78969436dae456c8fec4a0a706a3d65ec4 (diff)
Encapsulate the unit data in CompilationUnit
This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index fb05201010..6f6065dc45 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -120,7 +120,7 @@ void QQmlObjectCreator::init(QQmlContextData *providedParentContext)
if (compilationUnit && !compilationUnit->engine)
compilationUnit->linkToEngine(v4);
- qmlUnit = compilationUnit->data;
+ qmlUnit = compilationUnit->unitData();
context = nullptr;
_qobject = nullptr;
_scopeObject = nullptr;
@@ -1192,7 +1192,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo
Q_QML_OC_PROFILE(sharedState->profiler, profiler.update(
compilationUnit.data(), obj, typeRef->compilationUnit->fileName(),
context->url()));
- if (typeRef->compilationUnit->data->isSingleton())
+ if (typeRef->compilationUnit->unitData()->isSingleton())
{
recordError(obj->location, tr("Composite Singleton Type %1 is not creatable").arg(stringAt(obj->inheritedTypeNameIndex)));
return nullptr;