Build Fix: Workaround symbols inclusion from PCH headers

Broken in b128d498b2

Tested with MinGW 8.1
Tested with VisualStudio 2017

Change-Id: I8f43efe43016ea95866ee018ac9a47373a37373b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Cristian Adam
2019-10-22 10:13:29 +02:00
committed by Tim Jenssen
parent 90982bf2e2
commit 6463a686f6

View File

@@ -29,13 +29,36 @@
*/
#if defined __cplusplus
#include <QtGlobal>
#include <QtCore/qsystemdetection.h>
#ifdef Q_OS_WIN
#define WIN32_LEAN_AND_MEAN
// lib/Utils needs defines for Windows 8
#ifdef Q_CC_MINGW
#define WINVER _WIN32_WINNT_WIN8
#define _WIN32_WINNT _WIN32_WINNT_WIN8
#endif // Q_CC_MINGW
#define NOHELP
#include <qt_windows.h>
#undef DELETE
#undef IN
#undef OUT
#undef ERROR
#undef ABSOLUTE
//QT_NO_FLOAT16_OPERATORS is used on Visual Studio 2017 (and earlier):
//when including <QFloat16> and <bitset> in the same translation unit,
//it would cause a compilation error due to a toolchain bug (see [QTBUG-72073])
#if _MSC_VER <= 1920
#define QT_NO_FLOAT16_OPERATORS
#endif
#ifdef Q_WS_WIN
#define _POSIX_
#include <limits.h>
#undef _POSIX_
#endif
#endif // Q_OS_WIN
#include <QtCore>
@@ -48,7 +71,7 @@ using Qt::dec;
using Qt::showbase;
using Qt::hex;
using Qt::noforcesign;
#endif
#endif //QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <stdlib.h>
#endif
#endif //defined __cplusplus