forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user