qt5base-lts/doc/global
Giuseppe D'Angelo f66c1db16c Introduce Q_NAMESPACE_EXPORT
A recurring problem with the Q_NAMESPACE macro is that it declares
an object (staticMetaObject) in the surrounding namespace. That
object lacks any export/import qualification to make it usable
with shared libraries.

Introduce therefore another macro to work around this issue, allowing
the user to prefix the object with an exporting macro, f.i. like this:

Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)

The old macro can simply then be rewritten in terms of this new one,
supplying an empty export macro.

Note that NOT passing an argument to a macro expecting one is well
defined behavior in C99 -- the macro will expand an empty token.
Of course, MSVC doesn't like this and emits warnings. As a
workaround, use a variadic macro.

[ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It
can be used just like Q_NAMESPACE to add meta-object information
to a namespace; however it also supports exporting of such
information from shared libraries.

[ChangeLog][Potentially Source-Incompatible Changes] Prefixing
Q_NAMESPACE with an export macro may no longer work. Use the new
Q_NAMESPACE_EXPORT macro for that use case.

Fixes: QTBUG-68014
Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-28 06:47:29 +02:00
..
externalsites Qt Widgets: Document CMake macros 2019-05-16 13:24:25 +00:00
includes Document how to use CMake on Qt Core, Qt GUI's central pages 2019-05-07 07:46:21 +00:00
includes-online Unify license header usage. 2016-03-29 10:20:03 +00:00
template Doc: Remove background colors from simplified offline CSS 2019-03-10 20:00:11 +00:00
compat.qdocconf Doc: Ignore QML/JavaScript parsing errors 2017-02-07 08:34:39 +00:00
config.qdocconf Bump copyright year to 2019 2018-12-18 07:51:10 +00:00
externalsites.qdocconf Doc: Do not include the external sites by default 2014-09-03 09:40:59 +02:00
fileextensions.qdocconf Add shader files to examples documentation file list 2015-09-22 21:40:13 +00:00
html-config.qdocconf QDoc: Introduce a variable to set table of contents depth. 2014-06-11 15:13:29 +02:00
html-footer-online.qdocconf Bump copyright year to 2019 2018-12-18 07:51:10 +00:00
html-footer.qdocconf Bump copyright year to 2019 2018-12-18 07:51:10 +00:00
html-header-offline.qdocconf
html-header-online.qdocconf doc: Update online navigation header to match http://doc.qt.io/ 2018-10-17 16:16:28 +00:00
macros.qdocconf Documentation: Add \nullptr macro and use where applicable 2019-01-10 22:16:07 +00:00
manifest-meta.qdocconf Doc: Remove the default list of highlighted examples 2017-11-13 08:38:51 +00:00
qt-cpp-defines.qdocconf Introduce Q_NAMESPACE_EXPORT 2019-06-28 06:47:29 +02:00
qt-html-templates-offline-simple.qdocconf Fix jumping to anchors with offline style 2017-08-29 11:25:27 +00:00
qt-html-templates-offline.qdocconf Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-09 13:06:11 +00:00
qt-html-templates-online.qdocconf Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-09 13:06:11 +00:00
qt-module-defaults-offline.qdocconf Doc: Improve selection of offline template type 2015-10-21 08:15:35 +00:00
qt-module-defaults-online-commercial.qdocconf Doc: Update online documentation template 2015-02-26 12:26:15 +00:00
qt-module-defaults-online.qdocconf Bump copyright year to 2019 2018-12-18 07:51:10 +00:00
qt-module-defaults.qdocconf