aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-27 11:36:43 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-31 17:08:57 +0000
commit77449db6e086e8ac6594c432fede027656be0da0 (patch)
tree7bc9daff55d4480148488030f797ed517233736e /src/qml/qml/qqmlobjectcreator.cpp
parent71c66d4b41be95b44ffa0d9bbbf04164f74bd23a (diff)
Encapsulate access to CompiledData::Object and CompiledData::Import
This will make it easier to move the data out of CompiledData::Unit and into a separate data structure. Change-Id: I32e6233a66f2279b44cc06ef7c3505db4a565f98 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 76f5d69c1a..7a55ce78e0 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -166,7 +166,7 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent, QQmlI
if (subComponentIndex == -1) {
objectToCreate = /*root object*/0;
} else {
- const QV4::CompiledData::Object *compObj = qmlUnit->objectAt(subComponentIndex);
+ const QV4::CompiledData::Object *compObj = compilationUnit->objectAt(subComponentIndex);
objectToCreate = compObj->bindingTable()->value.objectIndex;
}
@@ -262,7 +262,7 @@ bool QQmlObjectCreator::populateDeferredProperties(QObject *instance, QQmlData::
int objectIndex = deferredData->deferredIdx;
qSwap(_compiledObjectIndex, objectIndex);
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(_compiledObjectIndex);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(_compiledObjectIndex);
qSwap(_compiledObject, obj);
qSwap(_ddata, declarativeData);
@@ -322,7 +322,7 @@ bool QQmlObjectCreator::populateDeferredBinding(const QQmlProperty &qmlProperty,
int objectIndex = deferredData->deferredIdx;
qSwap(_compiledObjectIndex, objectIndex);
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(_compiledObjectIndex);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(_compiledObjectIndex);
qSwap(_compiledObject, obj);
qSwap(_ddata, declarativeData);
@@ -784,7 +784,7 @@ void QQmlObjectCreator::setupBindings(bool applyDeferredBindings)
bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *bindingProperty, const QV4::CompiledData::Binding *binding)
{
if (binding->type == QV4::CompiledData::Binding::Type_AttachedProperty) {
- Q_ASSERT(stringAt(qmlUnit->objectAt(binding->value.objectIndex)->inheritedTypeNameIndex).isEmpty());
+ Q_ASSERT(stringAt(compilationUnit->objectAt(binding->value.objectIndex)->inheritedTypeNameIndex).isEmpty());
QV4::CompiledData::ResolvedTypeReference *tr = resolvedTypes.value(binding->propertyNameIndex);
Q_ASSERT(tr);
QQmlType attachedType = tr->type;
@@ -831,7 +831,7 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *bindingProper
return true;
if (binding->type == QV4::CompiledData::Binding::Type_GroupProperty) {
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(binding->value.objectIndex);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(binding->value.objectIndex);
if (stringAt(obj->inheritedTypeNameIndex).isEmpty()) {
QObject *groupObject = nullptr;
@@ -1130,7 +1130,7 @@ void QQmlObjectCreator::createQmlContext()
QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isContextObject)
{
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(index);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(index);
QQmlObjectCreationProfiler profiler(sharedState->profiler.profiler, obj);
ActiveOCRestorer ocRestorer(this, QQmlEnginePrivate::get(engine));
@@ -1257,7 +1257,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo
customParser->imports = compilationUnit->typeNameCache.data();
QList<const QV4::CompiledData::Binding *> bindings;
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(index);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(index);
const QV4::CompiledData::Binding *binding = obj->bindingTable();
for (quint32 i = 0; i < obj->nBindings; ++i, ++binding) {
if (binding->flags & QV4::CompiledData::Binding::IsCustomParserBinding) {
@@ -1424,7 +1424,7 @@ bool QQmlObjectCreator::populateInstance(int index, QObject *instance, QObject *
qSwap(_qobject, instance);
qSwap(_valueTypeProperty, valueTypeProperty);
qSwap(_compiledObjectIndex, index);
- const QV4::CompiledData::Object *obj = qmlUnit->objectAt(_compiledObjectIndex);
+ const QV4::CompiledData::Object *obj = compilationUnit->objectAt(_compiledObjectIndex);
qSwap(_compiledObject, obj);
qSwap(_ddata, declarativeData);
qSwap(_bindingTarget, bindingTarget);