From 4a08127caceff75d9e0ad4b20e6195c30a809447 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 3 Jul 2018 08:44:57 +0200 Subject: Keep login with an empty password from succeeding --- framework/qml/LoginAccount.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/qml/LoginAccount.qml b/framework/qml/LoginAccount.qml index f1289dc4..65f162a8 100644 --- a/framework/qml/LoginAccount.qml +++ b/framework/qml/LoginAccount.qml @@ -97,7 +97,11 @@ Item { } } } - Keys.onReturnPressed: login() + Keys.onReturnPressed: { + if (loader.item.valid) { + login() + } + } Item { id: footer @@ -112,6 +116,7 @@ Item { anchors.right: parent.right text: qsTr("Login") onClicked: login() + enabled: loader.item.valid } } } -- cgit v1.2.3