From 013503f8f1a29f12789a8f88bd095597170ff76b Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 8 Oct 2009 10:34:14 +0200 Subject: Prevented input composition in password fields on X11 and Windows. This restores the behavior in 4.5. Task: QT-2257 RevBy: Simon Hausmann --- src/gui/inputmethod/qwininputcontext_win.cpp | 2 +- src/gui/inputmethod/qximinputcontext_x11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index 4a160d7..e9ab870 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -701,7 +701,7 @@ void QWinInputContext::updateImeStatus(QWidget *w, bool hasFocus) if (!focusProxyWidget) focusProxyWidget = w; bool e = w->testAttribute(Qt::WA_InputMethodEnabled) && w->isEnabled() - && !(focusProxyWidget->inputMethodHints() & Qt::ImhExclusiveInputMask); + && !(focusProxyWidget->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)); bool hasIme = e && hasFocus; #ifdef Q_IME_DEBUG qDebug("%s HasFocus = %d hasIme = %d e = %d ", w->className(), hasFocus, hasIme, e); diff --git a/src/gui/inputmethod/qximinputcontext_x11.cpp b/src/gui/inputmethod/qximinputcontext_x11.cpp index bee3ce8..b46b162 100644 --- a/src/gui/inputmethod/qximinputcontext_x11.cpp +++ b/src/gui/inputmethod/qximinputcontext_x11.cpp @@ -612,7 +612,7 @@ void QXIMInputContext::setFocusWidget(QWidget *w) QInputContext::setFocusWidget(w); - if (!w || w->inputMethodHints() & Qt::ImhExclusiveInputMask) + if (!w || w->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)) return; ICData *data = ximData.value(w->effectiveWinId()); -- cgit v0.12