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

Aaron J. Seigo aseigo at kde.org
Wed Oct 20 12:14:46 CEST 2010


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 :)
 
> The applet's configChanged() method is called before the slot that is
> connected to the createConfigurationInterface's KConfigDialog's accepted()
> signal. This came as a bit of a surprise as it means that just writing out
> the config in this slot and relying on configChanged() to pick up and

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.

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

-- 
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: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20101020/df36319c/attachment.sig 


More information about the Plasma-devel mailing list