[PATCH] KRadioAction toggled() signal

Scott Wheeler wheeler at kde.org
Thu Oct 24 01:04:49 BST 2002

Sigmund Augdal pointed this one out on IRC:

KRadioAction is a subclass of KToggleAction, which has a toggled(bool) signal.  
Curretnly this signal is only emitted in the activated() slot, which is 
called when a user clicks on the action.

However, when there is an "exclusive group" KToggleAction::setChecked() 
unchecks all other checked items by calling setChecked(false) on the other 
items in the group.

However, since these items being unchecked are never "activated" 
toggled(false) is never emitted.  This patch (2 liner) moves the toggled() 
signal from activated() to setChecked(), which corrects the above behavior.

Ok to apply?



diff -u life.cpp~ life.cpp
--- life.cpp~   2002/03/19 07:44:28
+++ life.cpp   2002/04/09 15:49:39
-#include <sleep.h>
+#include <caffeine.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kaction.diff
Type: text/x-diff
Size: 629 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021024/f96c1e98/attachment.diff>

More information about the kde-core-devel mailing list