diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-12-17 12:19:41 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-23 15:20:16 +0100 |
commit | 883444f16b22a020821e9e699da6277b946fa501 (patch) | |
tree | 5031330eb36e1709d8087f599b3486943d5af34f /src/corelib/global | |
parent | 154b5394657d6520cd5490000afb3e99de626096 (diff) |
Ensure proper order of includes in qglobal.h
QAtomic will now depend on QTypeInfo, so shuffle the order to make
sure the includes are right.
The first set do not require anything but the macros from qglobal.h,
then qflags.h requires qtypeinfo.h and qtypetraits.h, qatomic.h
requires qtypeinfo.h and qglobalstatic.h requires qatomic.h.
Of those, only qatomic.h isn't in global/, so we could even consider
using "" includes, but I recall MSVC not honoring them correctly.
Change-Id: I76c150254a99cdea8857445bdebf2e724eaa76bd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 7dbe41aace..18e9ecae85 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1028,14 +1028,17 @@ template <typename T> struct QEnableIf<true, T> { typedef T Type; }; #endif QT_END_NAMESPACE -// Q_GLOBAL_STATIC -#include <QtCore/qglobalstatic.h> -// qDebug and friends +// We need to keep QTypeInfo, QSysInfo, QFlags, qDebug & family in qglobal.h for compatibility with Qt 4. +// Be careful when changing the order of these files. +#include <QtCore/qtypeinfo.h> +#include <QtCore/qsysinfo.h> #include <QtCore/qlogging.h> + #include <QtCore/qflags.h> -#include <QtCore/qsysinfo.h> -#include <QtCore/qtypeinfo.h> + +#include <QtCore/qatomic.h> +#include <QtCore/qglobalstatic.h> #endif /* __cplusplus */ |