aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-27 08:41:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-02 17:11:12 +0100
commitcd17b8a2a1f91d46ea3830171621928862609dd4 (patch)
tree39a928ef32db8098f8b8b83d6b897e57f29b3f42 /src/qml/qml/qqmlobjectcreator.cpp
parent6f6f822dfc4180264a4de1e98d3411a964570aa3 (diff)
[new compiler] Fix tst_qqmlqt::createComponent
Initialize the binding's self-pointer before calling addObject(), as some funky tests try to delete the binding from within there and the self-pointer allows us to find out later that the binding was deleted. Change-Id: I8c9e3fe7304f304eace29c0631263b1ec021a8c4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 58ed18ba40..53689775c6 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -770,6 +770,9 @@ bool QQmlObjectCreator::setPropertyBinding(QQmlPropertyData *property, const QV4
if (_valueTypeProperty)
targetCorePropertyData = QQmlPropertyPrivate::saveValueType(*_valueTypeProperty, _qobject->metaObject(), property->coreIndex, engine);
+ sharedState->allCreatedBindings.push(qmlBinding);
+ qmlBinding->m_mePtr = &sharedState->allCreatedBindings.top();
+
qmlBinding->setTarget(_bindingTarget, targetCorePropertyData, context);
if (targetCorePropertyData.isAlias()) {
@@ -788,9 +791,6 @@ bool QQmlObjectCreator::setPropertyBinding(QQmlPropertyData *property, const QV4
targetDeclarativeData->setPendingBindingBit(_bindingTarget, property->coreIndex);
}
}
-
- sharedState->allCreatedBindings.push(qmlBinding);
- qmlBinding->m_mePtr = &sharedState->allCreatedBindings.top();
}
return true;
}