configChanged() called *before* the slot connected to KConfigDialog

Ingomar Wesp ingomar at wesp.name
Wed Oct 20 12:51:57 CEST 2010


Aaron J. Seigo wrote:

> On Tuesday, October 19, 2010, Ingomar Wesp wrote:
>> While implementing configChanged() in the quicklaunch plasmoid, I noticed
>> (and worked around) the following problem:
> 
> please do not work around bugs. it usually just causes new bugs later.

> (and sometimes you end up actually working around your own bugs,
> misidentified as bugs lower in the stack :)

Which is exactly the case here.

>> The applet's configChanged() method is called before the slot that is
>> connected to the createConfigurationInterface's KConfigDialog's
>> accepted() signal. [...]
> 
> that's probably because it isn't connected to accepted(), but to the
> applyClicked() and okClicked() signals. the reason for this is that
> hitting "Apply" does not result in accepted() being called, but it needs
> to still call configChanged() and friends.

Ah! Thanks for pointing that out. That solved the issue.

> so connect to okClicked and applyClicked rather than accepted(). please
> consider adding this to the documentation on techbase as well.

Will do.

Thanks again,
Ingo


More information about the Plasma-devel mailing list