qtconfigmacros.h: add note to QT_AUTOTEST_EXPORT docs

About the requirement of wrapping unitests in "#ifdef
QT_BUILD_INTERNAL".

Stating the obvious (which wasn't obvious to me until Thiago pointed it
out in code review, so).

Change-Id: If8b3dda43a7034b8304d2b93c0fbedbdbdb184b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ahmad Samir 2023-06-18 23:29:12 +03:00
parent 5c9d820aeb
commit 83f20dad5c

View File

@ -43,6 +43,9 @@
No, this is not an evil backdoor. QT_BUILD_INTERNAL just exports more symbols
for Qt's internal unit tests. If you want slower loading times and more
symbols that can vanish from version to version, feel free to define QT_BUILD_INTERNAL.
\note After adding Q_AUTOTEST_EXPORT to a method, you'll need to wrap any unittests
that will use that method in "#ifdef QT_BUILD_INTERNAL".
*/
#if defined(QT_BUILD_INTERNAL) && defined(QT_BUILDING_QT) && defined(QT_SHARED)
# define Q_AUTOTEST_EXPORT Q_DECL_EXPORT