summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-03-21 15:08:36 +0100
committerhjk <qtc-committer@nokia.com>2011-03-21 15:08:36 +0100
commite73f43c7598529afb24b72d25fe65a9bfb55dca6 (patch)
tree5a433b94c9d53055a432a7e5b4851343d7cf09c5 /doc/api
parentb9cae782169c947ac6525edc5bf5b1b3dec50be9 (diff)
downloadqt-creator-e73f43c7598529afb24b72d25fe65a9bfb55dca6.tar.gz
coding-style: mention virtual inheritance
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/coding-style.qdoc9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc
index 0f6673b5a2..3703eb3345 100644
--- a/doc/api/coding-style.qdoc
+++ b/doc/api/coding-style.qdoc
@@ -537,9 +537,13 @@
\list
\o Do not use exceptions, unless you know what you do.
+
\o Do not use RTTI (Run-Time Type Information; that is, the typeinfo
struct, the dynamic_cast or the typeid operators, including throwing
exceptions), unless you know what you do.
+
+ \o Do not use virtual inheritance, unless you know what you do.
+
\o Use templates wisely, not just because you can.
Hint: Use the compile autotest to see whether a C++ feature is supported
@@ -559,12 +563,13 @@
either use the qdoc \c {\unicode} command or use the relevant macro.
For example: \c{\uuml} for \uuml.
\endlist
+
\o Use static keywords instead of anonymous namespaces whenever possible.
A name localized to the compilation unit with static is
guaranteed to have internal linkage. For names declared in anonymous
namespaces, the C++ standard unfortunately mandates external linkage
- (ISO/IEC 14882, 7.1.1/6, or see various discussions about this on the gcc mailing
- lists).
+ (ISO/IEC 14882, 7.1.1/6, or see various discussions about this on the gcc
+ mailing lists).
\endlist
\section3 Null Pointers