summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2010-03-03 17:54:23 +0100
committerRobert Griebl <rgriebl@trolltech.com>2010-03-03 19:42:40 +0100
commitf3c016b8d69612e1e7e5c59ad66b639059c6e246 (patch)
tree58764c5bb1b813e7902bd38d1cbe5b8e94e8a189
parentc9c1ae3030bff8b8e64d1c4e02f28faba1a8eb68 (diff)
downloadqt4-tools-f3c016b8d69612e1e7e5c59ad66b639059c6e246.tar.gz
Disable auto-uppercasing and predictive text for password line edits.
Reviewed-by: axis
-rw-r--r--src/gui/widgets/qlineedit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 7ccced6a80..94ee4b3c1a 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();