summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsscene.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 8d1795c3c2..583e6da90a 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -815,20 +815,19 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
lastFocusItem = focusItem;
#ifndef QT_NO_IM
- if (lastFocusItem
- && (lastFocusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
+ if (lastFocusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod) {
// Close any external input method panel. This happens
// automatically by removing WA_InputMethodEnabled on
// the views, but if we are changing focus, we have to
// do it ourselves.
if (qApp)
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
}
+#endif //QT_NO_IM
focusItem = 0;
QFocusEvent event(QEvent::FocusOut, focusReason);
sendEvent(lastFocusItem, &event);
-#endif //QT_NO_IM
}
// This handles the case that the item has been removed from the