summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-11-15 05:34:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-11-15 05:34:48 (GMT)
commit1c256b23df43aec975da2c9e8629d102ad13bd93 (patch)
tree03c3d6e541d6895ea80e4e5097ad7d34632877b4 /src
parent80cd74aa26b3b1968502b155b8645b37aa105c19 (diff)
parentee60e9c88c43cc33dc94a4cec79c62ffdf02ce58 (diff)
downloadQt-1c256b23df43aec975da2c9e8629d102ad13bd93.zip
Qt-1c256b23df43aec975da2c9e8629d102ad13bd93.tar.gz
Qt-1c256b23df43aec975da2c9e8629d102ad13bd93.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix focusScopeItemChange setting crash
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 466cc47..9e1fd09 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1157,7 +1157,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
p->d_ptr->focusScopeItem = 0;
- fsi->d_ptr->focusScopeItemChange(false);
}
break;
}
@@ -1259,6 +1258,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (!inDestructor && (transformData || (newParent && newParent->d_ptr->transformData)))
transformChanged();
+ // Reparenting is finished, now safe to notify the previous focusScopeItem about changes
+ if (parentFocusScopeItem)
+ parentFocusScopeItem->d_ptr->focusScopeItemChange(false);
+
// Restore the sub focus chain.
if (subFocusItem) {
subFocusItem->d_ptr->setSubFocus(newParent);