QML UI: don't disclose the current password

This isn't perfect, but at least it doesn't disclose a password that
isn't currently being edited.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-22 13:14:38 -07:00
parent a03aa44821
commit 680022aea5

View file

@ -95,6 +95,8 @@ Item {
id: showPassword id: showPassword
Layout.preferredWidth: col2Width Layout.preferredWidth: col2Width
onCheckedChanged: { onCheckedChanged: {
if (checked)
password.text = "" // don't show a hidden password
password.echoMode = checked ? TextInput.Normal : TextInput.Password password.echoMode = checked ? TextInput.Normal : TextInput.Password
} }
indicator: Rectangle { indicator: Rectangle {