I'm customising the KDE desktop environment for our corporate desktop, and I've found what I hope is not a bug -
In short, all I want to do is add a quicklaunch widget to the panel, then populate it with some application shortcuts via the plasma scripting interface.
I have code that I believe should work:
//new panel for testing purposes
var panel = new Panel;
var quicklaunch = panel.addWidget("org.kde.plasma.quicklaunch");
var qlurls = ["file:///usr/share/applications/firefox.desktop",
"file:///usr/share/applications/org.kde.dolphin.desktop"
];
quicklaunch.currentConfigGroup = ["General"];
quicklaunch.writeConfig("launcherUrls", qlurls);
//confirm it's written correctly
print(quicklaunch.readConfig("launcherUrls"));
//flailing for ideas now?!?
quicklaunch.reloadConfig()
You can test it by starting the scripting console in a KDE session, and copying and pasting:
qdbus org.kde.plasmashell /PlasmaShell showInteractiveConsole
This correctly adds a new panel, a quicklaunch widget, and applies all the same settings that were applied when I interrogated a manually created quicklaunch, but - it doesn't display any of the application shortcuts, just a rocket icon.
What am I doing wrong?
[UPDATE] Confirming it's a bug - I have tested on the KDE Neon distribution, which includes newer plasma packages, and this code works as expected.