createStandardKWindow()

David Faure faure at kde.org
Mon Jun 7 18:35:32 BST 2004


On Monday 07 June 2004 19:24, Oswald Buddenhagen wrote:
> On Mon, Jun 07, 2004 at 01:03:18PM -0400, Benjamin Meyer wrote:
> > > 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.
> > 
> > Yah, it is simple that way.  Changed with docs (it is suprising how
> > many enums in kdelibs don't have docs)
> > 
> the enum is a _bitmask_. guess what this means regarding its values and
> "testing operator".

Ouch. The values should be 1,2,4,8... 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?
> > 
> > Well if you have something that is "enable" you might think you can disable 
> > it.  I removing the K and changed it to createStandardWindow()  sense it can 
> > create actions and it could create the GUI  if Create is passed.
> > 
> <strong>but it does not create a _window_!!!</strong>
> i suggest setupFeatures() or addFeatures() or something like that.

setup() or setupGUI() (close to createGUI since it replaces it) sound good to me.

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