While fixing a plasma scripting example in the documentation, I noticed that my desktop widget's config keys was being logged twice. I had added a digitalclock widget to my desktop to test quickly. My Code: https://gist.github.com/Zren/e1a1c1a851a3fa76216d056b8f95c144 Notice I iterate the widgets in desktops() first, then panels() after. The output of the code is: desktops() org.kde.plasma.folder[35] com.github.zren.sysmongraphs[93]: org.kde.plasma.folder[35] com.github.zren.commandoutput[95]: org.kde.plasma.folder[35] org.kde.plasma.digitalclock[99]: org.kde.plasma.digitalclock: Appearance: showDate: true panels() org.kde.panel[1] org.kde.plasma.pager[3]: org.kde.panel[1] org.kde.plasma.systemtray[7]: org.kde.panel[1] org.kde.plasma.win7showdesktop[46]: org.kde.panel[1] org.kde.plasma.taskmanager[47]: ... org.kde.plasma.folder[35] com.github.zren.sysmongraphs[93]: org.kde.plasma.folder[35] com.github.zren.commandoutput[95]: org.kde.plasma.folder[35] org.kde.plasma.digitalclock[99]: org.kde.plasma.digitalclock: Appearance: showDate: true After skimming my code, I moved onto the scriptengine_v1.cpp code and found that while the desktops() function filters by !isPanel(), the panels() function does not. https://invent.kde.org/plasma/plasma-workspace/-/blame/master/shell/scripting/scriptengine_v1.cpp#L470 It was filtering by isPanel() before port to QJSEngine: https://invent.kde.org/plasma/plasma-workspace/-/commit/033ad5ca60b3d4250a4f354fa38fc60f7d97c78b#cbf01be30b27864a9b58f834c520a69d108a4888_467_469 Since I've confirmed this bug is a regression, I'll try to send a MR soon.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/825
Git commit 9eb6e16009fc13041f4cd675f103920155380c14 by Chris Holland. Committed on 28/04/2021 at 18:45. Pushed by cholland into branch 'master'. [scripting] Make panels() not return the desktops() containments It was filtering by isPanel() before port to QJSEngine: https://invent.kde.org/plasma/plasma-workspace/-/commit/033ad5ca60b3d4250a4f354fa38fc60f7d97c78b#cbf01be30b27864a9b58f834c520a69d108a4888_443_442 M +4 -2 shell/scripting/scriptengine_v1.cpp https://invent.kde.org/plasma/plasma-workspace/commit/9eb6e16009fc13041f4cd675f103920155380c14