[Uml-devel] Re: kdesdk/umbrello/umbrello

Luis De la Parra lparrab at gmx.net
Sun Apr 6 04:47:02 UTC 2003


> >  UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
> > +        _instance = this;
> 
> Is there a reason for starting the name of this variable with an
> underscore?

well... I always use m_ for member variables, but this one is not an
instance member but  a class member (static) so I thought m_ would be confusing  (
it could make you think it was object-specific )... since I couldnt think of a
better name, I just used _ 
feel free to change it if you want, but like I said, I think using m_ would
be confusing....  (maybe s_ or somethink like that)

> 
> The seems to go against naming convention used in Umbrello and anywhere
> else I've seen.

I agree about Umbrello ( but then again, we have alomost no static
variables, so there is not much to compare against )
the _name convention is widely used..  I cant name you a specific project
now, but I'm sure I've seen it before.

anyways, you may rename it if you want.

luis

ps: in case you are wondering.... I wanted to use UMLApp::instance(), but
that name is already taken by XMLGui, so I had to go for UMLApp::app() , but
you can also rename that if you want.

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!





More information about the umbrello-devel mailing list