summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-07-13 04:01:25 (GMT)
committerBill King <bill.king@nokia.com>2009-07-13 04:01:25 (GMT)
commitb7d274c1fc818b347ff9256a00e4f667f0bd1556 (patch)
tree2e8b9d6d920064b91a236aee1fd518f3c5b7c3ab /src/gui/kernel/qwidget.cpp
parentc402f363d8502c688433eb4f21ba3528d9ac89e5 (diff)
parentde07df9001586cc18ae267591359541b7ea494a0 (diff)
downloadQt-b7d274c1fc818b347ff9256a00e4f667f0bd1556.zip
Qt-b7d274c1fc818b347ff9256a00e4f667f0bd1556.tar.gz
Qt-b7d274c1fc818b347ff9256a00e4f667f0bd1556.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/plugins/kbddrivers/usb/main.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qwidget/tst_qwidget.cpp
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index a1a160e..c21ebda 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -9899,11 +9899,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
break;
case Qt::WA_InputMethodEnabled: {
QInputContext *ic = d->ic;
- if (!ic) {
- // implicitly create input context only if we have a focus
- if (hasFocus())
- ic = d->inputContext();
- }
+ if (!ic && (!on || hasFocus()))
+ ic = d->inputContext();
if (ic) {
if (on && hasFocus() && ic->focusWidget() != this && isEnabled()) {
ic->setFocusWidget(this);