forked from qt-creator/qt-creator
QmlDesigner: remove unused code
Change-Id: I00bc1b533f065b87a8d1b46e3296f76bf05b85d4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
@@ -814,14 +814,8 @@ QObject *ObjectNodeInstance::parent() const
|
|||||||
QObject *ObjectNodeInstance::parentObject(QObject *object)
|
QObject *ObjectNodeInstance::parentObject(QObject *object)
|
||||||
{
|
{
|
||||||
QQuickItem *quickItem = qobject_cast<QQuickItem*>(object);
|
QQuickItem *quickItem = qobject_cast<QQuickItem*>(object);
|
||||||
if (quickItem && quickItem->parentItem()) {
|
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();
|
|
||||||
|
|
||||||
return quickItem->parentItem();
|
return quickItem->parentItem();
|
||||||
}
|
|
||||||
|
|
||||||
return object->parent();
|
return object->parent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user