kcmkwin: Port deprecated KNewStuff signals

This also avoids an unnecessary reload when the changedEntries
are cleared.
This commit is contained in:
Alexander Lohnau 2021-04-19 17:45:48 +02:00
parent 0d9185053c
commit 4ed0fe3182
2 changed files with 10 additions and 2 deletions

View file

@ -106,7 +106,11 @@ Kirigami.Page {
icon.name: "get-hot-new-stuff"
visible: KAuthorized.authorize("ghns")
configFile: "window-decorations.knsrc"
onChangedEntriesChanged: kcm.reloadKWinSettings()
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
kcm.reloadKWinSettings()
}
}
}
}
}

View file

@ -125,7 +125,11 @@ ScrollViewKCM {
text: i18n("Get New Desktop Effects...")
visible: KAuthorized.authorize("ghns")
configFile: "kwineffect.knsrc"
onChangedEntriesChanged: kcm.onGHNSEntriesChanged()
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
kcm.onGHNSEntriesChanged()
}
}
}
}
}