summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2017-06-22 10:39:50 +0200
committerKai Uwe Broulik <[email protected]>2017-06-22 10:39:50 +0200
commitf00e4eb97e5d6a6abe76269342653a93f6b53245 (patch)
tree5c097f5ccdeff5ad1a14d87c1e4b90ad25a06bba
parent92a7089e9a103e5c7f93a46aaf67b01460dd8cb0 (diff)
[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
-rw-r--r--applets/appmenu/package/contents/ui/main.qml8
1 files changed, 3 insertions, 5 deletions
diff --git a/applets/appmenu/package/contents/ui/main.qml b/applets/appmenu/package/contents/ui/main.qml
index fdb0b86..23e4947 100644
--- a/applets/appmenu/package/contents/ui/main.qml
+++ b/applets/appmenu/package/contents/ui/main.qml
@@ -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 {