summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-09 07:53:46 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-09-09 07:53:46 (GMT)
commitd71d5ffd356342e55f09b31f5a702926f86994eb (patch)
tree9905e5ec166f9f26de4ad6633bf41b594a4b7de7 /src/gui/graphicsview/qgraphicsitem.cpp
parent85881f83c34cbb92e5d2ea61d16daef1f34fcad8 (diff)
parentf7906352b21b0634745094f7bb7966d5f6941192 (diff)
downloadQt-d71d5ffd356342e55f09b31f5a702926f86994eb.zip
Qt-d71d5ffd356342e55f09b31f5a702926f86994eb.tar.gz
Qt-d71d5ffd356342e55f09b31f5a702926f86994eb.tar.bz2
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 7023e9e..d67011b 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -934,7 +934,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent)
}
QGraphicsItem *lastSubFocusItem = subFocusItem;
- if (subFocusItem && !inDestructor) {
+ if (subFocusItem) {
// 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.
@@ -1226,6 +1226,8 @@ QGraphicsItem::~QGraphicsItem()
Q_ASSERT(d_ptr->children.isEmpty());
}
+ d_ptr->subFocusItem = 0;
+
if (d_ptr->scene) {
d_ptr->scene->d_func()->removeItemHelper(this);
} else {