From d57a7c41712f8627a462d893329dc3f0dbb52d32 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 28 Sep 2017 23:54:32 +0300 Subject: MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 API Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen --- src/plugins/bearer/generic/qgenericengine.cpp | 6 +++--- src/plugins/bearer/platformdefs_win.h | 1 + src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 4 +++- src/plugins/platforms/windows/qwindowsmousehandler.cpp | 4 ++-- src/plugins/platforms/windows/qwindowstheme.cpp | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index cd3b202001..7b0aa52831 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -55,10 +55,10 @@ #if defined(Q_OS_WIN32) // PMIB_TCPTABLE2 is only available since Vista -#if _WIN32_WINNT < 0x0600 +#if _WIN32_WINNT < 0x0601 # undef _WIN32_WINNT -# define _WIN32_WINNT 0x0600 -#endif // _WIN32_WINNT < 0x0600 +# define _WIN32_WINNT 0x0601 +#endif // _WIN32_WINNT < 0x0601 #include "../platformdefs_win.h" #include #endif diff --git a/src/plugins/bearer/platformdefs_win.h b/src/plugins/bearer/platformdefs_win.h index 5a8487d868..0477dc45c3 100644 --- a/src/plugins/bearer/platformdefs_win.h +++ b/src/plugins/bearer/platformdefs_win.h @@ -45,6 +45,7 @@ #include #include #undef interface +#include #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index c4aeb15bd1..26779f0c01 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -39,7 +39,9 @@ #define QT_NO_URL_CAST_FROM_STRING 1 -#define _WIN32_WINNT 0x0600 +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0601 +#endif #include "qwindowscombase.h" #include "qwindowsdialoghelpers.h" diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index 2b14edc804..9544fb81f7 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -60,7 +60,7 @@ * are present in the Windows SDK's, but not in older MSVC Express * versions. */ -#if defined(Q_CC_MINGW) || !defined(TOUCHEVENTF_MOVE) +#if !defined(TOUCHEVENTF_MOVE) typedef struct tagTOUCHINPUT { LONG x; @@ -85,7 +85,7 @@ typedef TOUCHINPUT const * PCTOUCHINPUT; # define TOUCHEVENTF_PALM 0x0080 # define TOUCHINPUTMASKF_CONTACTAREA 0x0004 # define TOUCHINPUTMASKF_EXTRAINFO 0x0002 -#endif // if defined(Q_CC_MINGW) || !defined(TOUCHEVENTF_MOVE) +#endif // if !defined(TOUCHEVENTF_MOVE) QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index a1ccf1f83c..651c661d6b 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -38,9 +38,9 @@ ****************************************************************************/ // SHSTOCKICONINFO is only available since Vista -#if _WIN32_WINNT < 0x0600 +#if _WIN32_WINNT < 0x0601 # undef _WIN32_WINNT -# define _WIN32_WINNT 0x0600 +# define _WIN32_WINNT 0x0601 #endif #include "qwindowstheme.h" -- cgit v1.2.3