summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2009-09-07 13:15:34 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-09-07 13:16:37 (GMT)
commitd724c91a0ae9ed38fd2dc33bcdd4edbe6aa69085 (patch)
treec3d6bb8e806c720dabe3791ef4ef5bb0025aa6fb /src/gui
parentbb9b4f4eb76d323ddafa24dc811d0b0b3d2ef4ec (diff)
downloadQt-d724c91a0ae9ed38fd2dc33bcdd4edbe6aa69085.zip
Qt-d724c91a0ae9ed38fd2dc33bcdd4edbe6aa69085.tar.gz
Qt-d724c91a0ae9ed38fd2dc33bcdd4edbe6aa69085.tar.bz2
Fix crash on QGraphicsItem destruction related to focus handling
Do not call clearFocus() for child item in setParentItemHelper() if called from destructor: At this time, the ~QGraphicsItem destructor already deleted all its children. Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index eae3e63..7023e9e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -934,7 +934,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
}
QGraphicsItem *lastSubFocusItem = subFocusItem;
- if (subFocusItem) {
+ if (subFocusItem && !inDestructor) {
// Update the child focus chain; when reparenting an item that has a
// focus child, ensure that that focus child clears its focus child
// chain from our parents before it's reparented.