createStandardKWindow()

Benjamin Meyer ben at meyerhome.net
Mon Jun 7 19:38:37 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 07 June 2004 1:35 pm, David Faure wrote:
> 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.

Yup, copied the enum from kmessagebox.  Should have caught that.

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

Much better and smaller name :)  Those changes and I moved the new functions 
into KMainWindow in this new patch.

- -Benjamin Meyer

- -- 
Public Key: http://www.csh.rit.edu/~benjamin/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAxLYw1rZ3LTw38vIRApAcAJwLU9jsGOhgyIKgyipXUUQGW8V1+QCfd0fx
sx1YZ0O7vaXyAEokeFOYv3o=
=4Ne9
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 5613 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040607/8da3d956/attachment.diff>


More information about the kde-core-devel mailing list