summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-04-14 11:14:21 +0200
committerhjk <qtc-committer@nokia.com>2011-04-14 11:15:08 +0200
commitc06ca69aa15590889d294775c5baa58617d00094 (patch)
tree54a4e6bfc26826d92c4bb3ddfd6e01c4e8f784c9 /doc/api
parentafdf1e69f8d2d93e479a78c144e6ce92fbff17bd (diff)
downloadqt-creator-c06ca69aa15590889d294775c5baa58617d00094.tar.gz
coding style: prefer 'class' over 'struct' for consistency reasons
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/coding-style.qdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc
index 3703eb3345..4030790c6f 100644
--- a/doc/api/coding-style.qdoc
+++ b/doc/api/coding-style.qdoc
@@ -440,8 +440,15 @@
protected, private. The public section is interesting for every
user of the class. The private section is only of interest for the
implementors of the class (you).
+
\o Avoid declaring global objects in the declaration file of the class.
If the same variable is used for all objects, use a static member.
+
+ \o Use \c{class} instead of \c{struct}. Some compilers mangle that
+ difference into the symbol names and spit out warnings if a struct
+ declaration is followed by a class definition. To avoid ongoing
+ changes from one to the other we declare \c{class} the prefered way.
+
\endlist
\section3 Declaring Variables