summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-09 14:13:18 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-09 14:19:31 (GMT)
commit6185ff436816738e933e3c88d44c45faa7f401f7 (patch)
treebc7c02c0f051568043de78687384fd99f123c4da /src/gui/graphicsview/qgraphicsitem_p.h
parent03428c4d2905cc73866f1d046b5cc1bedf1c38b3 (diff)
downloadQt-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/qgraphicsitem_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index e2a37a1..c502655 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -148,6 +148,7 @@ public:
paintedViewBoundingRectsNeedRepaint(0),
dirtySceneTransform(1),
geometryChanged(0),
+ inDestructor(0),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -183,7 +184,7 @@ public:
void resolveDepth(int parentDepth);
void addChild(QGraphicsItem *child);
void removeChild(QGraphicsItem *child);
- void setParentItemHelper(QGraphicsItem *parent, bool deleting);
+ void setParentItemHelper(QGraphicsItem *parent);
void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
@@ -403,7 +404,8 @@ public:
quint32 paintedViewBoundingRectsNeedRepaint : 1;
quint32 dirtySceneTransform : 1;
quint32 geometryChanged : 1;
- quint32 unused : 16; // feel free to use
+ quint32 inDestructor : 1;
+ quint32 unused : 15; // feel free to use
// Optional stacking order
int globalStackingOrder;