From 137353315c936b901367e9fa052ecc4b6a6b0820 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 23 Mar 2016 10:32:52 +0100 Subject: [PATCH] QtCore: Increase Windows API level to 0x600 (Windows Vista). Bump WINVER, _WIN32_WINNT in qt_windows.h and add a define in corelib.pro overriding the definition in _mingw.h which would otherwise cause a conflict in the precompiled header. Task-number: QTBUG-51673 Change-Id: I1428a74b2f00295afd06a0af7769ebf729daebb9 Reviewed-by: Oswald Buddenhagen --- src/corelib/corelib.pro | 10 ++++++++-- src/corelib/global/qt_windows.h | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 362ac37a59..9a5e832dcb 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -47,8 +47,14 @@ include(statemachine/statemachine.pri) include(mimetypes/mimetypes.pri) include(xml/xml.pri) -# otherwise mingw headers do not declare common functions like putenv -mingw: CONFIG -= strict_c++ +win32 { + mingw { + # otherwise mingw headers do not declare common functions like putenv + CONFIG -= strict_c++ + # Override MinGW's definition in _mingw.h + DEFINES += WINVER=0x600 _WIN32_WINNT=0x0600 + } +} mac|darwin { !ios { diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h index 8ac3c2135d..000da29fb8 100644 --- a/src/corelib/global/qt_windows.h +++ b/src/corelib/global/qt_windows.h @@ -48,10 +48,10 @@ #if defined(Q_CC_MINGW) // mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation # ifndef WINVER -# define WINVER 0x501 +# define WINVER 0x600 # endif # ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 +# define _WIN32_WINNT 0x600 # endif #endif