Commit 61ab0abf authored by Andrey Butirsky's avatar Andrey Butirsky Committed by Nate Graham
Browse files

fixup! [keyboard applet] fix TypeError garbage in log

New error:
/usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/
main.qml:17:5: Unable to assign [undefined] to QString

This is because just string is returned and not an object.
The expression should always return struct with proper fields instead.
parent 51ca0cc2
...@@ -11,7 +11,8 @@ import org.kde.plasma.workspace.keyboardlayout 1.0 ...@@ -11,7 +11,8 @@ import org.kde.plasma.workspace.keyboardlayout 1.0
PlasmaComponents3.ToolButton { PlasmaComponents3.ToolButton {
property alias keyboardLayout: keyboardLayout property alias keyboardLayout: keyboardLayout
readonly property bool hasMultipleKeyboardLayouts: keyboardLayout.layoutsList.length > 1 readonly property bool hasMultipleKeyboardLayouts: keyboardLayout.layoutsList.length > 1
readonly property var layoutNames: keyboardLayout.layoutsList.length ? keyboardLayout.layoutsList[keyboardLayout.layout] : "" readonly property var layoutNames: keyboardLayout.layoutsList.length ? keyboardLayout.layoutsList[keyboardLayout.layout]
: { shortName: "", displayName: "", longName: "" }
text: layoutNames.longName text: layoutNames.longName
visible: hasMultipleKeyboardLayouts visible: hasMultipleKeyboardLayouts
......
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