Commit f00e4eb9 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[AppMenu Applet] Workaround Connections bug in Qt >= 5.8

Since Qt 5.8 for some reason the Connections {} on plasmoid.nativeInterface breaks.

BUG: 375535
FIXED-IN: 5.10.3

Differential Revision: https://phabricator.kde.org/D6335
parent 92a7089e
......@@ -75,17 +75,15 @@ Item {
Component.onCompleted: {
plasmoid.nativeInterface.buttonGrid = buttonGrid
}
Connections {
target: plasmoid.nativeInterface
onRequestActivateIndex: {
// using a Connections {} doesn't work for some reason in Qt >= 5.8
plasmoid.nativeInterface.requestActivateIndex.connect(function (index) {
var idx = Math.max(0, Math.min(buttonRepeater.count - 1, index))
var button = buttonRepeater.itemAt(index)
if (button) {
button.clicked()
}
}
});
}
Repeater {
......
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