summaryrefslogtreecommitdiffstats
path: root/doc/global
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-11-22 10:30:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2021-11-27 01:25:10 +0100
commita0f9aef11bd3a692f9fa9c6069ca27200ef82893 (patch)
tree9b66bf55c56edabced026fe32f9a15ec1b361cb2 /doc/global
parentcf2336ae6e9b0dd0db9369d0a0bfaf9ecf393cf9 (diff)
Long live Q_GADGET_EXPORT!
Like Q_NAMESPACE_EXPORT for Q_NAMESPACE, this variant of Q_GADGET allows passing an export macro. This is useful to avoid exporting the whole class just to get the staticMetaObject hidden therein exported. Before anyone asks: No, we don't need Q_OBJECT_EXPORT, because QObject subclasses, being polymorphic, always need to have a class-level export macro (to export their vtable), but while that technique also works for value classes (the Q_GADGET audience), it is not desirable for them, because it makes inline functions exported in Windows debug builds, which is not what we want, because it needlessly restricts what you can to with the inline functions (e.g. remove). [ChangeLog][QtCore] Added the Q_GADGET_EXPORT macro, which is like Q_GADGET, but allows passing an export macro (like Q_NAMESPACE_EXPORT for Q_NAMESPACE). Fixes: QTBUG-55458 Change-Id: I546297de1e8aa45d83381991bcd3fbca61e1eef0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'doc/global')
-rw-r--r--doc/global/qt-cpp-defines.qdocconf1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index da4e537961..b45df3fce8 100644
--- a/doc/global/qt-cpp-defines.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -92,6 +92,7 @@ Cpp.ignoretokens += \
Q_EXPORT_PLUGIN \
Q_EXPORT_PLUGIN2 \
Q_GADGET \
+ Q_GADGET_EXPORT \
Q_GFX_INLINE \
Q_GUI_EXPORT \
Q_GUI_EXPORT_INLINE \