summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-04 04:03:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-04 04:03:23 (GMT)
commitded11a8737bf1828c0c4e188ec26af06f590e990 (patch)
treed08c93a18148787ed22a4c0fe6fad8acc0ac7726 /src
parentdf08e9135e4aec7ba9ff1e3519cc17cdebd97f6d (diff)
parent8e11af2579a976f4d8d839d814de19e25c912bae (diff)
downloadQt-ded11a8737bf1828c0c4e188ec26af06f590e990.zip
Qt-ded11a8737bf1828c0c4e188ec26af06f590e990.tar.gz
Qt-ded11a8737bf1828c0c4e188ec26af06f590e990.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: Don't crash if an item is removed from the scene while it is gaining focus. Add missing snippet file Snake game cannot be restarted
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 48a0093..a98ce6f 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -831,6 +831,11 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
#endif //QT_NO_IM
}
+ // This handles the case that the item has been removed from the
+ // scene in response to the FocusOut event.
+ if (item && item->scene() != q)
+ item = 0;
+
if (item)
focusItem = item;
updateInputMethodSensitivityInViews();