Commit b05cb534 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.


(cherry picked from commit 61ab0abf)
parent 9df495e0
......@@ -11,7 +11,8 @@ import org.kde.plasma.workspace.keyboardlayout 1.0
PlasmaComponents3.ToolButton {
property alias keyboardLayout: keyboardLayout
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
visible: hasMultipleKeyboardLayouts
......
Markdown is supported
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