Verified Commit 2e9020ca authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[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
parent 3b646dc4
Pipeline #170037 passed with stage
in 10 minutes and 26 seconds
......@@ -16,7 +16,7 @@ PlasmaComponents.ToolButton {
property int currentIndex: keyboard.currentLayout
onCurrentIndexChanged: keyboard.currentLayout = currentIndex
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)
visible: menu.count > 1 && !Qt.platform.pluginName.includes("wayland") // This menu needs porting to wayland
Component.onCompleted: {
......@@ -46,7 +46,6 @@ PlasmaComponents.ToolButton {
onObjectRemoved: menu.removeItem(object)
delegate: PlasmaComponents.MenuItem {
text: modelData.longName
property string shortName: modelData.shortName
onTriggered: {
keyboard.currentLayout = model.index
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment