diff options
author | Liang Qi <liang.qi@qt.io> | 2017-09-22 12:33:21 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-09-22 12:33:21 +0200 |
commit | 35e0b6f9f4b71dc48480c00b9aef8e9ad108b3e5 (patch) | |
tree | abc40b7b370e09db62b3a56480d44f090afe008f /src/qml/qml/qqmlobjectcreator.cpp | |
parent | 6334ae9fa983d03d0591e11d0be58bbbc4d45270 (diff) | |
parent | 112d668c0fded8c6ab7bf40fd3800cf43e005f95 (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: I3878bbf2ac7b62651215938c98ead7171be49c74
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 26bdf1a94f..4042e32120 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -163,7 +163,7 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent, QQmlI int objectToCreate; if (subComponentIndex == -1) { - objectToCreate = qmlUnit->indexOfRootObject; + objectToCreate = /*root object*/0; } else { const QV4::CompiledData::Object *compObj = qmlUnit->objectAt(subComponentIndex); objectToCreate = compObj->bindingTable()->value.objectIndex; @@ -1130,7 +1130,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo } ddata->setImplicitDestructible(); - if (static_cast<quint32>(index) == qmlUnit->indexOfRootObject || ddata->rootObjectInCreation) { + if (static_cast<quint32>(index) == /*root object*/0 || ddata->rootObjectInCreation) { if (ddata->context) { Q_ASSERT(ddata->context != context); Q_ASSERT(ddata->outerContext); @@ -1140,7 +1140,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo c->linkedContext = context; } else context->addObject(instance); - ddata->ownContext = true; + ddata->ownContext = ddata->context; } else if (!ddata->context) context->addObject(instance); |