From 65636ed06069fe7cc83ad159a0f48e4d3d7aba48 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 Apr 2020 10:17:43 +0200 Subject: [PATCH] Documentation: Add examples for Q_NAMESPACE(_EXPORT) It is not obvious how to use them. Change-Id: I60fdfb95f4c29cbc310d149495ebb38964e5a9ac Reviewed-by: Paul Wicking --- src/corelib/kernel/qobject.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 23e4e1163c5..3765e19184b 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} */