From 883444f16b22a020821e9e699da6277b946fa501 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 17 Dec 2013 12:19:41 -0800 Subject: [PATCH] Ensure proper order of includes in qglobal.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marc Mutz Reviewed-by: Friedemann Kleint Reviewed-by: Jędrzej Nowacki --- src/corelib/global/qglobal.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 7dbe41aaced..18e9ecae850 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1028,14 +1028,17 @@ template struct QEnableIf { typedef T Type; }; #endif QT_END_NAMESPACE -// Q_GLOBAL_STATIC -#include -// qDebug and friends -#include -#include -#include +// 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 +#include +#include + +#include + +#include +#include #endif /* __cplusplus */