From c9c9dce00fe6d43678e9c5a41a5a8a1c15b0e01b Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Thu, 16 Mar 2017 15:10:15 +0100 Subject: [PATCH] Move title logic to function --- qml/Main.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qml/Main.qml b/qml/Main.qml index 2a1d01f6..1af05da9 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -12,7 +12,7 @@ ApplicationWindow { minimumHeight: 400 minimumWidth: 300 visible: true - title: qsTr("Yubico Authenticator") + (settings.slotMode ? qsTr(" [Slot mode]") : '') + title: getTitle() property var device: yk property var credentials: device.credentials property bool validated: device.validated @@ -561,4 +561,8 @@ ApplicationWindow { addCredential.open() } } + + function getTitle() { + return qsTr("Yubico Authenticator") + (settings.slotMode ? qsTr(" [Slot mode]") : '') + } }