Plasma Applet empty config entrymap in init() but filled entrymap after init()

Aaron J. Seigo aseigo at kde.org
Fri Sep 30 06:53:36 UTC 2011


On Wednesday, September 28, 2011 14:28:36 Oliver Friedrich wrote:
> Hello
> 
> I'm writing an applet. Therefore I call in init() configChanged() which
> calls "KConfigGroup cg=config()".
> cg.entryMap() should return the entries I put in before.
> The problem is that the entryMap is empty until init() is finished.
> So when I call at the end of init() config() and have a look at the
> entries I get an empty map.

it really sounds like init() is being called from the constructor in your own 
applet, and then init() is then being called at the appropriate time later by 
Plasma::Containment in libplasma.

i don't see this in the code you patebin'd however, which makes it fairly 
confusing ... since what you describe doesn't match the code you shared?

> But right after init() configChanged() is called (seems to be
> automatically) and there the right values are read.

configChanged() is only called automatically when the config dialog is 
accepted by the user. it is never called otherwise. so i'm not sure what is 
going on with your applet :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20110930/0f8985ad/attachment.sig>


More information about the Plasma-devel mailing list