[Qt-interest] Qt Coding Style
Thiago Macieira
thiago.macieira at trolltech.com
Fri May 22 22:37:10 CEST 2009
Matthias Pospiech wrote:
>I have read
>http://qt.gitorious.org/qt/pages/QtCodingStyle
>http://qt.gitorious.org/qt/pages/CodingConventions
>
>but apart from Variables in general to be written in CamelCase I could
>not find out how one shall name
>member variables. The most known convention is m_NameOfVariable, which
>is ugly but intuitive.
>Also I could not see if function and local variables should be treated
>differently. For example pure lower case.
>
>I think, it would be interesting to to enhance the wiki page by such
>information.
There is no more information because there are no rules for those. So you
should follow the general rule for any variable and member name.
The m_nameOfVariable syntax isn't used because Qt doesn't have member
variables in the public classes. They are located almost exclusively in
the private classes, so they are accessed as d->nameOfVariable.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090522/15e2d3af/attachment.bin
More information about the Qt-interest-old
mailing list