QmlDesigner: move setObjectOwnership

- to the same position like in the other methods

Change-Id: Ie12147de0e9030a35928a2c0a5dd38d34f998845
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Tim Jenssen
2014-10-09 13:39:21 +02:00
parent fd6afba3c3
commit ab21b7b67a

View File

@@ -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;
}