LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File disable-im-for-password.diff of Package libqt4-sql-plugins (Project KDE:Qt:STABLE)

---
 src/gui/widgets/qlineedit.cpp |    5 +++++
 1 file changed, 5 insertions(+)

--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -554,6 +554,11 @@
     }
     setInputMethodHints(imHints);
     d->control->setEchoMode(mode);
+    // disable IM for password or noecho
+    if (mode == Password || mode == NoEcho)
+	setAttribute(Qt::WA_InputMethodEnabled, false);
+    else
+	setAttribute(Qt::WA_InputMethodEnabled, d->shouldEnableInputMethod());
     update();
 #ifdef Q_WS_MAC
     if (hasFocus())