forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Change-Id: I3f28f1f53cf2b2228928fbd7accf25d87bb40243
This commit is contained in:
@@ -814,14 +814,8 @@ QObject *ObjectNodeInstance::parent() const
|
||||
QObject *ObjectNodeInstance::parentObject(QObject *object)
|
||||
{
|
||||
QQuickItem *quickItem = qobject_cast<QQuickItem*>(object);
|
||||
if (quickItem && quickItem->parentItem()) {
|
||||
|
||||
//QQuickRootItem is used by Window and we want to return the Window as parent
|
||||
if (strcmp(quickItem->metaObject()->className(), "QQuickRootItem"))
|
||||
return object->parent();
|
||||
|
||||
if (quickItem && quickItem->parentItem())
|
||||
return quickItem->parentItem();
|
||||
}
|
||||
|
||||
return object->parent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user