Skip to content

Saving layouts breaks configuration

Andrey Alekseev requested to merge parovoz/plasma-workspace:scripting_fix into master

I was working on layouts manager kcm !1626 and found out that applet configuration is being written incorrectly.

If I save my desktop layout by calling "dumpCurrentLayoutJS" DBus method, I will get a serialized layout.js, which I can apply again via "evaluateScript". After repeating this a couple of times, layout.js (and user's config file ~/.config/plasma-org.kde.plasma.desktop-appletsrc) will contain lots of garbage config groups and keys, something like:


This happens because Plasma::Applet::config() returns a "/Configuration" group, but "dumpCurrentLayoutJS" saves all applets' config from root, so when we need to save some value through scripting api it will always prepend "/Configuration"

Edited by Andrey Alekseev

Merge request reports