summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-09-04 03:35:25 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-04 13:33:57 (GMT)
commit7d41759f87db72ff9b9ff1d8ce017f466440f2ef (patch)
treef262db33b3af32e68b8baff50200c350670bf467 /src/gui
parent7aacb8b3ff5c4c998298207b355b9c301d736d34 (diff)
downloadQt-7d41759f87db72ff9b9ff1d8ce017f466440f2ef.zip
Qt-7d41759f87db72ff9b9ff1d8ce017f466440f2ef.tar.gz
Qt-7d41759f87db72ff9b9ff1d8ce017f466440f2ef.tar.bz2
Don't call pure virtuals on deleting QGraphicsItem
This also needs to be reviewed by andreas. Reviewed-by: Michael Brasser
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index cdcb0c4..16a9a0a 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -4780,10 +4780,12 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n
if (transformData)
thisToParentTransform = transformData->computedFullTransform(&thisToParentTransform);
QGraphicsItem *clipParent = parent;
- while (clipParent && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) {
+ while (clipParent && !clipParent->d_ptr->inDestructor && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) {
thisToParentTransform *= clipParent->d_ptr->transformToParent();
clipParent = clipParent->d_ptr->parent;
}
+ if (clipParent && clipParent->d_ptr->inDestructor)
+ return;
// thisToParentTransform is now the same as q->itemTransform(clipParent), except
// that the new position (which is not yet set on the item) is taken into account.