qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake cmake: correct version dependency for qt5_add_big_resources 2019-05-20 12:49:37 +02:00
concurrent Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
corelib Corelib tests: Fix out of bounds string access 2019-06-28 00:24:54 +02:00
dbus Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
gui Merge remote-tracking branch 'origin/5.13' into dev 2019-06-27 14:38:03 +02:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network Merge remote-tracking branch 'origin/5.13' into dev 2019-06-27 14:38:03 +02:00
opengl Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
other Merge remote-tracking branch 'origin/5.12' into dev 2019-06-25 13:04:27 +02:00
printsupport test: migrate QPrinterInfo test to QRegularExpression 2019-06-11 09:08:11 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
testlib Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
tools Introduce Q_NAMESPACE_EXPORT 2019-06-28 06:47:29 +02:00
widgets tst_QAction(Group): Brush up the tests 2019-06-28 00:24:40 +02:00
xml Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00