summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
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/widgets
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/widgets')
-rw-r--r--src/widgets/widgets/qlineedit.cpp1
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 43030289ff..4dc30d6542 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -1751,6 +1751,7 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
reason != Qt::PopupFocusReason)
deselect();
+ d->control->commitPreedit();
d->setCursorVisible(false);
d->control->setCursorBlinkPeriod(0);
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 258ab1bb11..a55e001fc4 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -2046,6 +2046,7 @@ void QWidgetTextControlPrivate::focusEvent(QFocusEvent *e)
}
#endif
} else {
+ commitPreedit();
setBlinkingCursorEnabled(false);
if (cursorIsFocusIndicator