forked from qt-creator/qt-creator
Windows: Remove explicit usage of _WIN32_WINNT and WINVER macros
The are set in a central place, in the precompile header file. Or as DEFAULT_DEFINES when the precompile header file is not used. Change-Id: Ie020f916b64eabcd5a8153f4be5474986f5afed5 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -15,6 +15,13 @@ list(APPEND DEFAULT_DEFINES
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS)
|
list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
|
if (NOT BUILD_WITH_PCH)
|
||||||
|
# Windows 8 0x0602
|
||||||
|
list(APPEND DEFAULT_DEFINES
|
||||||
|
WINVER=0x0602 _WIN32_WINNT=0x0602
|
||||||
|
WIN32_LEAN_AND_MEAN)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -45,10 +45,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// We need defines for Windows 8
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT _WIN32_WINNT_WIN8
|
|
||||||
|
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -32,8 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0501 /* WinXP, needed for GetNativeSystemInfo() */
|
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,10 @@
|
|||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT 0x0501
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|||||||
@@ -26,10 +26,7 @@
|
|||||||
#include "winutils.h"
|
#include "winutils.h"
|
||||||
#include "qtcassert.h"
|
#include "qtcassert.h"
|
||||||
|
|
||||||
// Enable WinAPI Windows Vista and later
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0600 // Needed for QueryFullProcessImageName
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -40,10 +40,6 @@ static inline QString msgCannotInterrupt(qint64 pid, const QString &why)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0501 /* WinXP, needed for DebugBreakProcess() */
|
|
||||||
|
|
||||||
#include <utils/winutils.h>
|
#include <utils/winutils.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0400
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "registerpostmortemaction.h"
|
#include "registerpostmortemaction.h"
|
||||||
|
|
||||||
#include <registryaccess.h>
|
#include <registryaccess.h>
|
||||||
|
|||||||
@@ -28,10 +28,6 @@
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
// Enable Win API of XP SP1 and later
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0502
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <utils/winutils.h>
|
#include <utils/winutils.h>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#define _WIN32_WINNT 0x0502
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifndef PROCESS_SUSPEND_RESUME
|
#ifndef PROCESS_SUSPEND_RESUME
|
||||||
#define PROCESS_SUSPEND_RESUME 0x0800
|
#define PROCESS_SUSPEND_RESUME 0x0800
|
||||||
|
|||||||
@@ -40,9 +40,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// Enable Win API of XP SP1 and later
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0502
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <utils/winutils.h>
|
#include <utils/winutils.h>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
|
|||||||
@@ -31,24 +31,31 @@
|
|||||||
#if defined __cplusplus
|
#if defined __cplusplus
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
// lib/Utils needs defines for Windows 8
|
||||||
|
#undef WINVER
|
||||||
|
#define WINVER 0x0602
|
||||||
|
#undef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0602
|
||||||
|
|
||||||
|
#define NOHELP
|
||||||
|
#include <qt_windows.h>
|
||||||
|
|
||||||
|
#undef DELETE
|
||||||
|
#undef IN
|
||||||
|
#undef OUT
|
||||||
|
#undef ERROR
|
||||||
|
#undef ABSOLUTE
|
||||||
|
|
||||||
#define _POSIX_
|
#define _POSIX_
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#undef _POSIX_
|
#undef _POSIX_
|
||||||
#endif
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QtCore>
|
||||||
#include <QList>
|
|
||||||
#include <QVariant>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QRegExp>
|
|
||||||
#include <QString>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QScopedPointer>
|
|
||||||
#include <QSharedPointer>
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|||||||
Reference in New Issue
Block a user