Clear set password dialog

This commit is contained in:
Dag Heyman 2017-03-18 18:27:40 +01:00
parent 5e7c103ccb
commit 287a08c4e7
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338
3 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,7 @@ ApplicationWindow {
onAccepted: {
trySetPassword()
passwordUpdated.open()
setPassword.clear()
}
}

View File

@ -47,6 +47,7 @@ DefaultDialog {
}
Button {
text: qsTr("Cancel")
id: cancelBtn
onClicked: close()
KeyNavigation.tab: password
Keys.onEscapePressed: close()

View File

@ -10,6 +10,7 @@ DefaultDialog {
modality: Qt.ApplicationModal
property string newPassword: newPassword.text
property bool matchingPasswords: newPassword.text === confirmPassword.text
onClosing: clear()
ColumnLayout {
anchors.fill: parent
@ -67,4 +68,9 @@ DefaultDialog {
accepted()
}
}
function clear() {
newPassword.text = ""
confirmPassword.text = ""
}
}