createStandardKWindow()

David Faure faure at kde.org
Mon Jun 7 13:36:35 BST 2004


On Monday 07 June 2004 02:13, Benjamin Meyer wrote:
> 1) Rather than a number of bools for params have only two params.  The first 
> being params disabled, and the second being enabled ones (or'd together).  
> This way you can turn off one or two things you don't want, but in the future 
> as new things are added they will work by default.

Yes. A series of bools is difficult to read ("false, true, false, false" == ??), and difficult
to extend. I would have suggested a simple bitfield enum though. Having two
bitfields is a bit strange - if something is not specified in the disabled list
nor in the enabled list, what does it mean? That KMainWindow can choose what
to do about it? Sounds a bit undefined.

> 2) Rather than looking for options_configure_keybinding if keys is true and 
> actions->count() > 0 add?
i.e. not looking whether the action exists already? Since the addition of the
action is controlled by a bool/flag already, I guess it's not needed indeed.

> 3) createStandardKWindow() Name it something else? createKMainWindow()   
> createStandardKMainWindow()  createStandardWindow()  ?

It's in the KMainWindow namespace already, so no need for KMainWindow in the name.
But in fact this isn't "creating"... That's what the constructor did. This is more
about activating a number of automatic features.... setWindowFeatures?
enableMainWindowFeatures?

-- 
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