From ab21b7b67a71bf288bf5ab334e139b7298da1061 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 9 Oct 2014 13:39:21 +0200 Subject: [PATCH] QmlDesigner: move setObjectOwnership - to the same position like in the other methods Change-Id: Ie12147de0e9030a35928a2c0a5dd38d34f998845 Reviewed-by: Thomas Hartmann --- .../qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 36e4b4cda89..d75f2866bb6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -1042,14 +1042,13 @@ QObject *ObjectNodeInstance::createComponent(const QUrl &componentUrl, QQmlConte QObject *object = component.beginCreate(context); tweakObjects(object); component.completeCreate(); + QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); if (component.isError()) { qWarning() << "Error in:" << Q_FUNC_INFO << componentUrl; foreach (const QQmlError &error, component.errors()) qWarning() << error; } - QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); - return object; }