summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-09-04 03:35:25 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-09-04 03:35:25 (GMT)
commitf2d3043e72dbfd9281925ccda76840dfd35ff38f (patch)
tree05faf252ccc2481c2e8cb746e5e581b821ba7d9e /src/gui
parente18ef05b68919d3b022d0f4e84c63401fcfbadce (diff)
downloadQt-f2d3043e72dbfd9281925ccda76840dfd35ff38f.zip
Qt-f2d3043e72dbfd9281925ccda76840dfd35ff38f.tar.gz
Qt-f2d3043e72dbfd9281925ccda76840dfd35ff38f.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 e931e4c..75bdf1f 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -4789,10 +4789,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.