diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-09 14:13:18 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-09 14:19:31 (GMT) |
commit | 6185ff436816738e933e3c88d44c45faa7f401f7 (patch) | |
tree | bc7c02c0f051568043de78687384fd99f123c4da /src/gui/graphicsview/qgraphicsscene_p.h | |
parent | 03428c4d2905cc73866f1d046b5cc1bedf1c38b3 (diff) | |
download | Qt-6185ff436816738e933e3c88d44c45faa7f401f7.zip Qt-6185ff436816738e933e3c88d44c45faa7f401f7.tar.gz Qt-6185ff436816738e933e3c88d44c45faa7f401f7.tar.bz2 |
Remove duplicated code for removing an item from the scene.
Before we had almost two identical functions for removing an item from
the scene. There was only minor differences depending on whether the
item was removed from QGraphicsScene::removeItem or from the item's
destructor. Now we have one function that handles both cases just fine.
Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index 42c4d8c..11e9b64 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -131,7 +131,7 @@ public: bool regenerateIndex; bool purgePending; - void _q_removeItemLater(QGraphicsItem *item); + void removeItemHelper(QGraphicsItem *item); QSet<QGraphicsItem *> removedItems; void purgeRemovedItems(); @@ -264,7 +264,8 @@ public: QRegion *exposedRegion, QWidget *widget, QList<QGraphicsItem *> *topLevelItems = 0, qreal parentOpacity = qreal(1.0)); void markDirty(QGraphicsItem *item, const QRectF &rect = QRectF(), bool invalidateChildren = false, - bool maybeDirtyClipPath = false, bool force = false, bool ignoreOpacity = false); + bool maybeDirtyClipPath = false, bool force = false, bool ignoreOpacity = false, + bool removingItemFromScene = false); void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false); inline void resetDirtyItem(QGraphicsItem *item) |