diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 864e3b1d87..1808d01389 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -68,6 +68,35 @@ #include #endif +/* + The Qt modules' export macros. + The options are: + - defined(QT_STATIC): Qt was built or is being built in static mode + - defined(QT_SHARED): Qt was built or is being built in shared/dynamic mode + If neither was defined, then QT_SHARED is implied. If Qt was compiled in static + mode, QT_STATIC is defined in qconfig.h. In shared mode, QT_STATIC is implied + for the bootstrapped tools. +*/ + +#ifdef QT_BOOTSTRAPPED +# ifdef QT_SHARED +# error "QT_SHARED and QT_BOOTSTRAPPED together don't make sense. Please fix the build" +# elif !defined(QT_STATIC) +# define QT_STATIC +# endif +#endif + +#if defined(QT_SHARED) || !defined(QT_STATIC) +# ifdef QT_STATIC +# error "Both QT_SHARED and QT_STATIC defined, please make up your mind" +# endif +# ifndef QT_SHARED +# define QT_SHARED +# endif +#endif + +#include + /* The QT_CONFIG macro implements a safe compile time check for features of Qt. Features can be in three states: @@ -455,37 +484,6 @@ constexpr inline Deprecated_t Deprecated = {}; } #endif -/* - The Qt modules' export macros. - The options are: - - defined(QT_STATIC): Qt was built or is being built in static mode - - defined(QT_SHARED): Qt was built or is being built in shared/dynamic mode - If neither was defined, then QT_SHARED is implied. If Qt was compiled in static - mode, QT_STATIC is defined in qconfig.h. In shared mode, QT_STATIC is implied - for the bootstrapped tools. -*/ - -#ifdef QT_BOOTSTRAPPED -# ifdef QT_SHARED -# error "QT_SHARED and QT_BOOTSTRAPPED together don't make sense. Please fix the build" -# elif !defined(QT_STATIC) -# define QT_STATIC -# endif -#endif - -#if defined(QT_SHARED) || !defined(QT_STATIC) -# ifdef QT_STATIC -# error "Both QT_SHARED and QT_STATIC defined, please make up your mind" -# endif -# ifndef QT_SHARED -# define QT_SHARED -# endif -#endif - -QT_BEGIN_INCLUDE_NAMESPACE -#include -QT_END_INCLUDE_NAMESPACE - /* Some classes do not permit copies to be made of an object. These classes contains a private copy constructor and assignment