summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-01-17 16:19:34 +0200
committerQt by Nokia <qt-info@nokia.com>2012-01-19 00:16:42 +0100
commita3a0b0373540fa2ee9a2b85e5d394fb03e879483 (patch)
treea842f00ca86916e453c335e7dffbbf697e904586 /src/widgets
parent8ecc2da31d00a3d4ae5379f1acffe295a31d891b (diff)
QWidget editors to return correct value for Qt::ImEnabled
Qt::ImEnabled input method query was added for Qt5. Enhancing source compatibility with Qt4 by setting query value in QWidget if widget does not return any valid value. Change-Id: I274c1f6c47a5cb08ecf550b25e5b358622e21d90 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 531a217b1d..d6e85bef29 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -7929,6 +7929,8 @@ bool QWidget::event(QEvent *event)
Qt::InputMethodQuery q = (Qt::InputMethodQuery)(int)(queries & (1<<i));
if (q) {
QVariant v = inputMethodQuery(q);
+ if (q == Qt::ImEnabled && !v.isValid() && isEnabled())
+ v = QVariant(true); // special case for Qt4 compatibility
query->setValue(q, v);
}
}