[sddm-theme] KeyboardButton: Fix layout name not being shown

It used to cause an error like this:

    [03:21:31.246] (WW) GREETER: file:///usr/share/sddm/themes/breeze/KeyboardButton.qml:19: TypeError: Cannot read property 'shortName' of null

(cherry picked from commit 2e9020ca6c)
wilder-5.24
ivan tkachenko 4 years ago
parent b5c5979a7f
commit e2b631d435
No known key found for this signature in database
GPG Key ID: AF72731B7C654CB3
  1. 3
      sddm-theme/KeyboardButton.qml

@ -10,7 +10,7 @@ PlasmaComponents.ToolButton {
property int currentIndex: -1
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName)
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", keyboard.layouts[currentIndex].shortName)
implicitWidth: minimumWidth
visible: menu.items.length > 1
@ -27,7 +27,6 @@ PlasmaComponents.ToolButton {
onObjectRemoved: keyboardMenu.removeItem( object )
delegate: QQC.MenuItem {
text: modelData.longName
property string shortName: modelData.shortName
onTriggered: {
keyboard.currentLayout = model.index
}

Loading…
Cancel
Save