Commit 6fcf9a5e authored by Tranter Madi's avatar Tranter Madi Committed by Nate Graham

Fix System Tray popup interactivity after echanging item visiblity

Summary:
Avoid using `plasmoid.rootItem` in SystemTray's ConfigEntries.qml.

BUG: 393630
FIXED-IN: 5.14.6

Reviewers: #plasma, ngraham, broulik, davidedmundson, anthonyfieroni, fvogt

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18805
parent bb1fb581
......@@ -44,6 +44,25 @@ QtLayouts.GridLayout {
}
}
PlasmaCore.DataSource {
id: statusNotifierSource
engine: "statusnotifieritem"
interval: 0
onSourceAdded: {
connectSource(source)
}
Component.onCompleted: {
connectedSources = sources
}
}
PlasmaCore.SortFilterModel {
id: statusNotifierModel
sourceModel: PlasmaCore.DataModel {
dataSource: statusNotifierSource
}
}
QtControls.CheckBox {
id: showAllCheckBox
QtLayouts.Layout.fillWidth: true
......@@ -66,11 +85,9 @@ QtLayouts.GridLayout {
}
function retrieveAllItems() {
print(plasmoid)
print(plasmoid.rootItem.statusNotifierModel)
var list = [];
for (var i = 0; i < plasmoid.rootItem.statusNotifierModel.count; ++i) {
var item = plasmoid.rootItem.statusNotifierModel.get(i);
for (var i = 0; i < statusNotifierModel.count; ++i) {
var item = statusNotifierModel.get(i);
list.push({
"index": i,
"taskId": item.Id,
......@@ -233,7 +250,7 @@ QtLayouts.GridLayout {
// both SNIs and plasmoids are listed in the same TableView
// but they come from two separate models, so we need to subtract
// the SNI model count to get the actual plasmoid index
var index = modelData.index - plasmoid.rootItem.statusNotifierModel.count
var index = modelData.index - statusNotifierModel.count
plasmoid.applets[index].globalShortcut = keySequence
iconsPage.configurationChanged()
......
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