[PATCH] Don't enable action in KSelectAction::setItems()

David Faure faure at kde.org
Tue Jan 13 11:56:29 GMT 2004

On Tuesday 13 January 2004 12:49, Clarence Dang wrote:
> Hi,
> If your KSelectAction is disabled, calling KSelectAction::setItems() enables 
> it which is not the expected behaviour.
> Please review the attached patch.

Hmm, the problem is that this will break if you setItems(emptylist) followed
by setItems(some items). The first one will disable, the second will never re-enable.

The problem with behavior that is both automatic and manual is that you need
the manual way to override the automatic way (which is missing), but the two must
be separate settings for this to work. So I think you need a bool in a private class.

David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list