[screenlocker] Clear password field after an idle timeout

Clear the password field if no input happened for 30 sec. This is
intended for cases that the user starts entering the password and
then moves away from the system leaving it in a state where anyone
could unlock the session by just pressing enter.

BUG: 326633
FIXED-IN: 5.3.0
REVIEW: 122511
wilder-5.14
Martin Gräßlin 11 years ago
parent 6db8fbb45c
commit 5df5d9698a
  1. 15
      lookandfeel/contents/lockscreen/LockScreen.qml

@ -164,6 +164,13 @@ Image {
}
text = "";
}
onTextChanged: {
if (text == "") {
clearTimer.stop();
} else {
clearTimer.restart();
}
}
Keys.onLeftPressed: {
if (text == "") {
@ -179,6 +186,14 @@ Image {
event.accepted = false;
}
}
Timer {
id: clearTimer
interval: 30000
repeat: false
onTriggered: {
passwordInput.text = "";
}
}
}
PlasmaComponents.Button {

Loading…
Cancel
Save