problem with KToggleToolBarAction (+patch)

David Faure david at
Fri Oct 25 22:46:17 BST 2002

Hash: SHA1

On Friday 25 October 2002 20:34, Simon Hausmann wrote:
> 1) We could make setChecked less intelligent. I guess the original idea behind
> the current setChecked implementation was to make things easier for developers
> calling setChecked explicitly. To still update the toolbar visibility status
> when the user activates the corresponding 'Show Foo Toolbar' menu item we could
> simply call setShown() on the toolbar in slotActivated() . This solution is
> implemented in kaction2_patch.txt

Yes, it's wrong that setChecked(bool) activates some changes, it should only
check or uncheck the action. Remember that we removed "emit activated"
from setChecked in KToggleAction. The hiding/showing of the toolbars should
only happen when the _user_ activates the action, not when setChecked() is called.

> Solution 1 could possibly break third-party apps that rely on setChecked
> basically causing the activation on the action (-> showing/hiding the toolbar)

Those would need to be fixed. Did this action exist in 3.0?

PS: Solution 1 is kaction2_patch.txt and solution 2 is kaction1_patch.txt? How confusing ;)

- -- 
David FAURE, david at, faure at
Contributing to:,
Get the latest KOffice -
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the kde-core-devel mailing list