diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-15 05:34:48 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-15 05:34:48 (GMT) |
commit | 1c256b23df43aec975da2c9e8629d102ad13bd93 (patch) | |
tree | 03c3d6e541d6895ea80e4e5097ad7d34632877b4 /src | |
parent | 80cd74aa26b3b1968502b155b8645b37aa105c19 (diff) | |
parent | ee60e9c88c43cc33dc94a4cec79c62ffdf02ce58 (diff) | |
download | Qt-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.cpp | 5 |
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); |