QML applet - write config

Jan Grulich grulja at gmail.com
Thu May 9 09:49:02 UTC 2013


Hi,

I'm trying to save the current state of my applet and I use for that 
plasmoid.writeConfig(). But it seems it doesn't work because this 
configuration is not saved. I thought it's saved in 
plasma-desktop-appletsrc file but it's not. When I try to save for 
example some string using plasmoid.writeConfig("testfoo", "foo") and 
then read this configuration the value is always undefined and there is 
no key named "testfoo" in plasma-desktop-appletsrc.

Here is the part of code that I have in configChanged() function:

plasmoid.writeConfig("testfoo", "foo");
var bar = plasmoid.readConfig("testfoo");
if (bar == "foo") {
    console.log("equal");
}

The configuration is not saved and the condition is never evaluated to true.

Thanks for your help

Cheers,
Jan


More information about the Plasma-devel mailing list