diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-30 14:19:25 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-30 14:19:25 (GMT) |
commit | 53ef0b0f8b1227cff6ce4c9e2a91a6fbc7e7ee3b (patch) | |
tree | fa79022dd1f11836662c14269b1e191979f3e167 /src/gui/graphicsview/qgraphicssceneindex.cpp | |
parent | 3a00930fe167e6db5588d9e93d429486f9591bd1 (diff) | |
download | Qt-53ef0b0f8b1227cff6ce4c9e2a91a6fbc7e7ee3b.zip Qt-53ef0b0f8b1227cff6ce4c9e2a91a6fbc7e7ee3b.tar.gz Qt-53ef0b0f8b1227cff6ce4c9e2a91a6fbc7e7ee3b.tar.bz2 |
Make QGraphicsSceneIndex::clear() less nasty.
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicssceneindex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index a42dc54..2f2f05e 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -521,8 +521,9 @@ void QGraphicsSceneIndex::updateSceneRect(const QRectF &rect) */ void QGraphicsSceneIndex::clear() { - for (int i = 0 ; i < items().size(); ++i) - removeItem(items().at(i)); + const QList<QGraphicsItem *> allItems = items(); + for (int i = 0 ; i < allItems.size(); ++i) + removeItem(allItems.at(i)); } /*! |