summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-02-28 13:35:17 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-27 12:51:38 +0200
commit0ee1b4a1dea8b587a5d39bfeb7e18c97f13dd877 (patch)
tree72069427d47ad395a9b9a29ccbf5e5c69ebc0c93 /src/widgets/kernel
parent4f92f9b7251addef556b25e8ab88e00acfaf61b0 (diff)
Reverted use of tentative commit use in QWidget editors
Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 2615ac891d..a099faae3f 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2042,7 +2042,7 @@ void QApplication::setActiveWindow(QWidget* act)
if (QApplicationPrivate::focus_widget) {
if (QApplicationPrivate::focus_widget->testAttribute(Qt::WA_InputMethodEnabled))
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange, Qt::ActiveWindowFocusReason);
QApplication::sendEvent(QApplicationPrivate::focus_widget, &focusAboutToChange);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 9a32d952f9..cccde764ad 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3090,7 +3090,7 @@ void QWidgetPrivate::setEnabled_helper(bool enable)
if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
qApp->inputMethod()->update(Qt::ImEnabled);
} else {
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
qApp->inputMethod()->update(Qt::ImEnabled);
}
}
@@ -5948,7 +5948,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
if (prev) {
if (reason != Qt::PopupFocusReason && reason != Qt::MenuBarFocusReason
&& prev->testAttribute(Qt::WA_InputMethodEnabled)) {
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
}
if (reason != Qt::NoFocusReason) {
@@ -6057,7 +6057,7 @@ void QWidget::clearFocus()
{
if (hasFocus()) {
if (testAttribute(Qt::WA_InputMethodEnabled))
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange);
QApplication::sendEvent(this, &focusAboutToChange);
@@ -10087,7 +10087,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
QWidget *focusWidget = d->effectiveFocusWidget();
if (on && !internalWinId() && hasFocus()
&& focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
qApp->inputMethod()->update(Qt::ImEnabled);
}
if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget()
@@ -10137,7 +10137,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
#ifndef QT_NO_IM
if (qApp->focusObject() == this) {
if (!on)
- qApp->inputMethod()->reset();
+ qApp->inputMethod()->commit();
qApp->inputMethod()->update(Qt::ImEnabled);
}
#endif //QT_NO_IM