forked from qt-creator/qt-creator
QmlDesigner: avoid setContext warning if there is already one
Change-Id: I2d23f8f18cce11bdfbdcb4a8d9d6d99fec7d20e6 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -1158,7 +1158,7 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
|
||||
|
||||
tweakObjects(object);
|
||||
|
||||
if (object)
|
||||
if (object && QQmlEngine::contextForObject(object) == 0)
|
||||
QQmlEngine::setContextForObject(object, context);
|
||||
|
||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
|
||||
|
Reference in New Issue
Block a user