summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-31 03:52:30 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-31 03:52:30 (GMT)
commit4d262c4e96f7bce1e1b4e96ee21949d05df75da1 (patch)
tree2387a16509a3de88e63c21dcce1384eeb1e639d4
parentcfc3564328c9545a9eed4aca02f99dac5e0e4390 (diff)
downloadQt-4d262c4e96f7bce1e1b4e96ee21949d05df75da1.zip
Qt-4d262c4e96f7bce1e1b4e96ee21949d05df75da1.tar.gz
Qt-4d262c4e96f7bce1e1b4e96ee21949d05df75da1.tar.bz2
Notify QML internal notifiers of item geometry changes before QML signal handlers.
Task-number: QTBUG-12303 Reviewed-by: Aaron Kennedy
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 1054898..aca2bb7 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -1883,6 +1883,12 @@ void QDeclarativeItem::geometryChanged(const QRectF &newGeometry,
}
}
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Geometry)
+ change.listener->itemGeometryChanged(this, newGeometry, oldGeometry);
+ }
+
if (newGeometry.x() != oldGeometry.x())
emit xChanged();
if (newGeometry.width() != oldGeometry.width())
@@ -1891,12 +1897,6 @@ void QDeclarativeItem::geometryChanged(const QRectF &newGeometry,
emit yChanged();
if (newGeometry.height() != oldGeometry.height())
emit heightChanged();
-
- for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
- const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
- if (change.types & QDeclarativeItemPrivate::Geometry)
- change.listener->itemGeometryChanged(this, newGeometry, oldGeometry);
- }
}
void QDeclarativeItemPrivate::removeItemChangeListener(QDeclarativeItemChangeListener *listener, ChangeTypes types)