Move title logic to function

This commit is contained in:
Dag Heyman 2017-03-16 15:10:15 +01:00
parent 146d55b838
commit c9c9dce00f
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338

View File

@ -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]") : '')
}
}