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 07:34:57 (GMT)
commite24b4b83fa4e71ab137ac254a9c69fec672d5e66 (patch)
tree744a4c062a643c4453267566675fc72504f2e8b5 /src
parente393f03cb89c795e4a638f84b002cb16fd1613a7 (diff)
downloadQt-e24b4b83fa4e71ab137ac254a9c69fec672d5e66.zip
Qt-e24b4b83fa4e71ab137ac254a9c69fec672d5e66.tar.gz
Qt-e24b4b83fa4e71ab137ac254a9c69fec672d5e66.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 bd0f0d8..8cee021 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -820,13 +820,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();
}
/*!