summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-02 10:17:43 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-22 22:03:46 +0200
commit65636ed06069fe7cc83ad159a0f48e4d3d7aba48 (patch)
tree7593f1044ea7cb08aaa2e828fe4ec4a2df6b5992
parente0a78bf4501c3102578d2de02c95418fa5bb4611 (diff)
Documentation: Add examples for Q_NAMESPACE(_EXPORT)
It is not obvious how to use them. Change-Id: I60fdfb95f4c29cbc310d149495ebb38964e5a9ac Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/corelib/kernel/qobject.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 23e4e1163c..3765e19184 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4614,6 +4614,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
\c{staticMetaObject} is of type QMetaObject and provides access to the
enums declared with Q_ENUM_NS/Q_FLAG_NS.
+ For example:
+
+ \code
+ namespace test {
+ Q_NAMESPACE
+ ...
+ \endcode
+
\sa Q_NAMESPACE_EXPORT
*/
@@ -4630,6 +4638,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
is declared with the supplied \a EXPORT_MACRO qualifier. This is
useful if the object needs to be exported from a dynamic library.
+ For example:
+
+ \code
+ namespace test {
+ Q_NAMESPACE_EXPORT(EXPORT_MACRO)
+ ...
+ \endcode
+
\sa Q_NAMESPACE, {Creating Shared Libraries}
*/