From 83f20dad5c0f3150e9df62e6f92a2b67868b9aee Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sun, 18 Jun 2023 23:29:12 +0300 Subject: [PATCH] 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 --- src/corelib/global/qtconfigmacros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/global/qtconfigmacros.h b/src/corelib/global/qtconfigmacros.h index a89894ff24..9d185a0aa3 100644 --- a/src/corelib/global/qtconfigmacros.h +++ b/src/corelib/global/qtconfigmacros.h @@ -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