summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2010-09-15 17:05:09 (GMT)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2010-09-15 17:05:09 (GMT)
commit1d30c86ab0b0c609c68bb53adc633b3da8b2863d (patch)
tree164bbf954ba2ce1054f66de6b9bcac1a2dc3c005 /src/gui/graphicsview
parente0087081ff6088a284dff30a3ec7e24684236588 (diff)
downloadQt-1d30c86ab0b0c609c68bb53adc633b3da8b2863d.zip
Qt-1d30c86ab0b0c609c68bb53adc633b3da8b2863d.tar.gz
Qt-1d30c86ab0b0c609c68bb53adc633b3da8b2863d.tar.bz2
Fix bug in 34b805d66c09fb324d1b6a7bcf259e8743ef3894
This time the implementation of clear is correct Reviewed-by: Marco Bubke
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 9e43f2f..2600d06 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7679,8 +7679,9 @@ QGraphicsObject *QGraphicsItemPrivate::children_at(QDeclarativeListProperty<QGra
void QGraphicsItemPrivate::children_clear(QDeclarativeListProperty<QGraphicsObject> *list)
{
QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast<QGraphicsObject *>(list->object));
- for (int index = 0 ;index < d->children.count();index++)
- QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0);
+ int childCount = d->children.count();
+ for (int index = 0; index < childCount; index++)
+ QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0);
}
/*!