summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2010-03-03 16:54:23 (GMT)
committerRobert Griebl <rgriebl@trolltech.com>2010-03-03 18:42:40 (GMT)
commitf3c016b8d69612e1e7e5c59ad66b639059c6e246 (patch)
tree58764c5bb1b813e7902bd38d1cbe5b8e94e8a189 /src/gui/widgets/qlineedit.cpp
parentc9c1ae3030bff8b8e64d1c4e02f28faba1a8eb68 (diff)
downloadQt-f3c016b8d69612e1e7e5c59ad66b639059c6e246.zip
Qt-f3c016b8d69612e1e7e5c59ad66b639059c6e246.tar.gz
Qt-f3c016b8d69612e1e7e5c59ad66b639059c6e246.tar.bz2
Disable auto-uppercasing and predictive text for password line edits.
Reviewed-by: axis
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-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 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();