From 29ec5db8aff24382e5a6e25f386e95aa9bf4ddb9 Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Mon, 10 Apr 2017 09:16:49 +0200 Subject: [PATCH] Don't clear password prompt before remembering --- qml/PasswordPrompt.qml | 9 +++++++++ qml/main.qml | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/qml/PasswordPrompt.qml b/qml/PasswordPrompt.qml index 54437ebd..9b57eaff 100644 --- a/qml/PasswordPrompt.qml +++ b/qml/PasswordPrompt.qml @@ -11,6 +11,14 @@ DefaultDialog { property string password: password.text property bool remember: rememberPassword.checked + onVisibilityChanged: { + // Clear the password from old canceled entries + // when a new dialog is shown. + if (visible) { + clear() + } + } + ColumnLayout { RowLayout { Label { @@ -62,5 +70,6 @@ DefaultDialog { function clear() { password.text = '' + rememberPassword.checked = false } } diff --git a/qml/main.qml b/qml/main.qml index 8462c347..a5844048 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -521,7 +521,6 @@ ApplicationWindow { } else { device.validate(passwordPrompt.password) } - passwordPrompt.clear() } function deleteSelectedCredential() {