Add method to run a script from DBus directly

Review Request #125648 - Created Oct. 15, 2015 and submitted - Latest diff uploaded

Information
David Edmundson
plasma-workspace
3c96208...
Reviewers
plasma

loadScriptInInteractiveConsole requires user interaction which blocks
some purposes, like setting the desktop background from an app.

This runs a given script directly from a passed string without any prompts.

CCBUG: 217950


Questions:

I also toyed with returning the value of a script as a QDBusVariant, thoughts?

Should I not run if widgets are locked?

Ran this:
var allDesktops = desktops();
print (allDesktops);

for (i=0;i<allDesktops.length;i++) {
d = allDesktops[i];
d.wallpaperPlugin = "org.kde.image";
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
d.writeConfig("Image", "file:///home/david/pictures/Wallpapers/northern_lights-wide.jpg")
}

also ran some with errors, that behaved as expected too.

Loading...