From f3c016b8d69612e1e7e5c59ad66b639059c6e246 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 17:54:23 +0100 Subject: Disable auto-uppercasing and predictive text for password line edits. Reviewed-by: axis --- src/gui/widgets/qlineedit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 7ccced6..94ee4b3 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -544,6 +544,11 @@ void QLineEdit::setEchoMode(EchoMode mode) } else { imHints &= ~Qt::ImhHiddenText; } + if (mode != Normal) { + imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } else { + imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } setInputMethodHints(imHints); d->control->setEchoMode(mode); update(); -- cgit v0.12