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);
|
QObject *object = component.beginCreate(context);
|
||||||
tweakObjects(object);
|
tweakObjects(object);
|
||||||
component.completeCreate();
|
component.completeCreate();
|
||||||
|
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||||
|
|
||||||
if (component.isError()) {
|
if (component.isError()) {
|
||||||
qWarning() << "Error in:" << Q_FUNC_INFO << componentUrl;
|
qWarning() << "Error in:" << Q_FUNC_INFO << componentUrl;
|
||||||
foreach (const QQmlError &error, component.errors())
|
foreach (const QQmlError &error, component.errors())
|
||||||
qWarning() << error;
|
qWarning() << error;
|
||||||
}
|
}
|
||||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user