summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-04-29 07:11:02 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-04-29 08:58:53 (GMT)
commitb7ea50145c6dc443e15d9f3f1e1dd1737a5135cc (patch)
tree6aa0990060d5f3c7f9a00bee913da8a668e4d92d /src
parentcc1d15dc46ecdc661e9eb96e0a6c2bd3832d5c83 (diff)
downloadQt-b7ea50145c6dc443e15d9f3f1e1dd1737a5135cc.zip
Qt-b7ea50145c6dc443e15d9f3f1e1dd1737a5135cc.tar.gz
Qt-b7ea50145c6dc443e15d9f3f1e1dd1737a5135cc.tar.bz2
Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.
When focusInEvent is called we need to ensure that WA_InputMethodEnabled is set, since FocusInEvent might lead to that QInputContext::setFocusWidget is called (with the QGraphicsView as the widget parameter). However, if the widget still does not have WA_InputMethodEnabled set yet it will assert in QInputContext::setFocusWidget (it requires that the widget has the flag set). This was a problem for the morbit bridge, where Dui requires the attribute to be set (while Orbit actually does not require) Task-number: QTBUG-10276 Reviewed-by: jasplin Reviewed-by: Alexis Menard
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index b368a82..98fc10f 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -808,13 +808,13 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
#endif //QT_NO_IM
}
- if (item) {
+ if (item)
focusItem = item;
+ updateInputMethodSensitivityInViews();
+ if (item) {
QFocusEvent event(QEvent::FocusIn, focusReason);
sendEvent(item, &event);
}
-
- updateInputMethodSensitivityInViews();
}
/*!