summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-19 11:21:45 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-19 12:45:10 (GMT)
commit6c3acdf906a678158928b76cf047b58fbb9f8969 (patch)
tree7dda19176abf079bce531e7b9db54bec8a03cf62
parentefecee2ca71bb89c9e40090c50fd5c27aeadbd18 (diff)
downloadQt-6c3acdf906a678158928b76cf047b58fbb9f8969.zip
Qt-6c3acdf906a678158928b76cf047b58fbb9f8969.tar.gz
Qt-6c3acdf906a678158928b76cf047b58fbb9f8969.tar.bz2
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.
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp6
1 files changed, 1 insertions, 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);
}
/*!