summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2011-11-08 18:12:02 +0200
committerQt by Nokia <qt-info@nokia.com>2011-11-10 13:07:38 +0100
commitdc2a1aff9bc6bf18f594f96924f767165bf4581f (patch)
treed670384b73ab6e2e063d4862644754058a053ee5 /src/widgets/graphicsview/qgraphicsitem.cpp
parentb5c37d9e137dee2754335e83b8437dfd0e6cc7e7 (diff)
QWidget text editors to commit text on their own on losing focus
Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 060a3da05f..b30d29e704 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -10214,10 +10214,8 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event)
case QEvent::KeyRelease:
// Reset the focus widget's input context, regardless
// of how this item gained or lost focus.
- if (event->type() == QEvent::FocusIn) {
+ if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) {
qApp->inputPanel()->reset();
- } else if (event->type() == QEvent::FocusOut) {
- qApp->inputPanel()->commit();
} else {
qApp->inputPanel()->update(Qt::ImQueryInput);
}