QLineEdit to use Qt::ImhSensitiveData input hint on password echo modes

Change-Id: I6922e41e7e57563f1190f46e0890b71e5c4b7ef4
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
This commit is contained in:
Pekka Vuorela 2012-01-02 16:34:19 +02:00 committed by Qt by Nokia
parent 68202f646a
commit bff6cf7b5b

View File

@ -486,9 +486,9 @@ void QLineEdit::setEchoMode(EchoMode mode)
imHints &= ~Qt::ImhHiddenText;
}
if (mode != Normal) {
imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
} else {
imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
}
setInputMethodHints(imHints);
d->control->setEchoMode(mode);