diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-08 10:03:48 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-08 12:46:41 +0000 |
commit | ebda8170a6b00b830fba59a230506ab3ca52e6c5 (patch) | |
tree | 32389049ebb5b12becb732835c5f32ffb27ba8a9 /src/qml/qml/qqmlobjectcreator.cpp | |
parent | 874539649508cc1a9cd0ec7ab45b374d18c2c4e5 (diff) |
Get rid of the root object index variable
This is a follow-up to the parent commit to remove the variable that
is really a constant (zero).
Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 890d1ca7fe..07a90d4d63 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; @@ -1121,7 +1121,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); |