From 11ee62bf76c74003a47e54987b59b8d407d1933a Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 18 Aug 2022 10:23:19 +0200 Subject: [PATCH] Move Q_AUTOTEST_EXPORT to qtconfigmacros.h The include statements for qconfig*.h can now be moved there too. Task-number: QTBUG-99313 Change-Id: I65f564fc48b9074861b0f8b50046062c2e83090c Reviewed-by: Qt CI Bot Reviewed-by: Edward Welbourne --- src/corelib/global/qglobal.h | 21 --------------------- src/corelib/global/qtconfigmacros.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3815f75de5..cae86f87c3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -22,14 +22,6 @@ #endif #include - -#ifdef QT_BOOTSTRAPPED -#include -#else -#include -#include -#endif - #include #include @@ -56,19 +48,6 @@ inline void qt_noop(void) {} #ifndef __ASSEMBLER__ QT_BEGIN_NAMESPACE -/* - 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. -*/ -#if defined(QT_BUILD_INTERNAL) && defined(QT_BUILDING_QT) && defined(QT_SHARED) -# define Q_AUTOTEST_EXPORT Q_DECL_EXPORT -#elif defined(QT_BUILD_INTERNAL) && defined(QT_SHARED) -# define Q_AUTOTEST_EXPORT Q_DECL_IMPORT -#else -# define Q_AUTOTEST_EXPORT -#endif - #define Q_INIT_RESOURCE(name) \ do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); \ QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (false) diff --git a/src/corelib/global/qtconfigmacros.h b/src/corelib/global/qtconfigmacros.h index eb045a8cfa..3d22ae164c 100644 --- a/src/corelib/global/qtconfigmacros.h +++ b/src/corelib/global/qtconfigmacros.h @@ -4,6 +4,13 @@ #ifndef QTCONFIGMACROS_H #define QTCONFIGMACROS_H +#ifdef QT_BOOTSTRAPPED +#include +#else +#include +#include +#endif + /* The Qt modules' export macros. The options are: @@ -31,6 +38,19 @@ # endif #endif +/* + 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. +*/ +#if defined(QT_BUILD_INTERNAL) && defined(QT_BUILDING_QT) && defined(QT_SHARED) +# define Q_AUTOTEST_EXPORT Q_DECL_EXPORT +#elif defined(QT_BUILD_INTERNAL) && defined(QT_SHARED) +# define Q_AUTOTEST_EXPORT Q_DECL_IMPORT +#else +# define Q_AUTOTEST_EXPORT +#endif + /* The QT_CONFIG macro implements a safe compile time check for features of Qt. Features can be in three states: