From 6c3acdf906a678158928b76cf047b58fbb9f8969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Fri, 19 Feb 2010 12:21:45 +0100 Subject: Revert "Speed up QmlGraphicsItem::setParentItem." This reverts commit 282a46ab5edafa7b82e9c58658143cb979db2d85. This change introduced some regression due to itemChange notifications not being delivered as expected (reported by Warwick). We have to find another solution, unfortunately. However, the performance penalty isn't that big so we can live with it for now. --- src/declarative/graphicsitems/qmlgraphicsitem.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 262c192..22beb12 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -1336,12 +1336,8 @@ void QmlGraphicsItem::setParentItem(QmlGraphicsItem *parent) QmlGraphicsItem *oldParent = parentItem(); if (parent == oldParent || !parent) return; - Q_D(QmlGraphicsItem); QObject::setParent(parent); - d->setParentItemHelper(parent, /*newParentVariant=*/0, /*thisPointerVariant=*/0); - if (oldParent) - emit oldParent->childrenChanged(); - emit parentChanged(); + QGraphicsObject::setParentItem(parent); } /*! -- cgit v0.12