summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-12-15 22:22:16 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-12-15 22:22:16 (GMT)
commit889b15f62121fd79b28b9f903569fc101578a139 (patch)
treee428adfeaa373673aa6557da6ede7ac56b63a800 /src/declarative/graphicsitems/qmlgraphicspositioners.cpp
parent1e234c557ddbe5787b537f14ca383bd16e4e4cd1 (diff)
downloadQt-889b15f62121fd79b28b9f903569fc101578a139.zip
Qt-889b15f62121fd79b28b9f903569fc101578a139.tar.gz
Qt-889b15f62121fd79b28b9f903569fc101578a139.tar.bz2
Watch item geometry changes without using signal/slot connections.
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicspositioners.cpp')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
index b96b8b8..ecaab80 100644
--- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
@@ -67,8 +67,7 @@ void QmlGraphicsBasePositionerPrivate::watchChanges(QmlGraphicsItem *other)
QmlGraphicsItemPrivate *otherPrivate = static_cast<QmlGraphicsItemPrivate*>(QGraphicsItemPrivate::get(other));
- otherPrivate->connectToHeightChanged(q, prePosIdx);
- otherPrivate->connectToWidthChanged(q, prePosIdx);
+ otherPrivate->addGeometryListener(this);
otherPrivate->registerSiblingOrderNotification(this);
watched << other;
@@ -81,8 +80,8 @@ void QmlGraphicsBasePositionerPrivate::unwatchChanges(QmlGraphicsItem* other)
bool stillAlive = false; //Use the returns from disconnect to see if it was deleted or just reparented
stillAlive |= QMetaObject::disconnect(other, visibleIdx, q, prePosIdx);
stillAlive |= QMetaObject::disconnect(other, opacityIdx, q, prePosIdx);
- stillAlive |= otherPrivate->disconnectFromHeightChanged(q, prePosIdx);
- stillAlive |= otherPrivate->disconnectFromWidthChanged(q, prePosIdx);
+
+ otherPrivate->removeGeometryListener(this);
if(stillAlive)
otherPrivate->unregisterSiblingOrderNotification(this);