Fix build on MinGW after 0f14ea3f3a05ef785b44fa610bf90ff3b5ba7beb

Also generalize set _WIN32_WINNT to 0x0501 and _WIN32_IE to 0x0501 globally,
as it is out minimal requirement these days.

Change-Id: I8ca9102d49c37f908fd8ac032f707f8fe4fdcb22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Konstantin Ritt 2012-10-27 14:52:42 +03:00 committed by The Qt Project
parent 2eefa819c4
commit 63e451194e
4 changed files with 20 additions and 14 deletions

View File

@ -46,17 +46,17 @@
// Borland's windows.h does not set these correctly, resulting in // Borland's windows.h does not set these correctly, resulting in
// unusable WinSDK standard dialogs // unusable WinSDK standard dialogs
#ifndef WINVER #ifndef WINVER
#define WINVER 0x400 # define WINVER 0x0501
#endif #endif
#ifndef _WIN32_WINNT #ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x400 # define _WIN32_WINNT 0x0501
#endif #endif
#endif #endif
#if defined(Q_CC_MINGW) #if defined(Q_CC_MINGW)
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation // mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
#ifndef WINVER #ifndef WINVER
#define WINVER 0x500 # define WINVER 0x501
#endif #endif
#endif #endif
@ -65,6 +65,13 @@
#endif #endif
#include <windows.h> #include <windows.h>
#if defined(_WIN32_IE) && _WIN32_IE < 0x0501
# undef _WIN32_IE
#endif
#if !defined(_WIN32_IE)
# define _WIN32_IE 0x0501
#endif
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
#include <ceconfig.h> #include <ceconfig.h>
#endif #endif

View File

@ -718,9 +718,6 @@ QWindowsOleDropTarget::Drop(LPDATAOBJECT pDataObj, DWORD grfKeyState,
return NOERROR; return NOERROR;
} }
#if defined(Q_CC_MINGW) && !defined(_WIN32_IE)
# define _WIN32_IE 0x0501
#endif
/*! /*!
\class QWindowsDrag \class QWindowsDrag

View File

@ -53,10 +53,6 @@
#include <qpa/qplatformtheme.h> #include <qpa/qplatformtheme.h>
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
#if defined(_WIN32_IE)
# undef _WIN32_IE
#endif
# define _WIN32_IE 0x0500
# include <qt_windows.h> # include <qt_windows.h>
# include <commctrl.h> # include <commctrl.h>
# include <objbase.h> # include <objbase.h>

View File

@ -42,12 +42,18 @@
#include "qsystemtrayicon_p.h" #include "qsystemtrayicon_p.h"
#ifndef QT_NO_SYSTEMTRAYICON #ifndef QT_NO_SYSTEMTRAYICON
#ifndef _WIN32_WINNT #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
#define _WIN32_WINNT 0x0600 # undef _WIN32_WINNT
#endif
#if !defined(_WIN32_WINNT)
# define _WIN32_WINNT 0x0600
#endif #endif
#ifndef _WIN32_IE #if defined(_WIN32_IE) && _WIN32_IE < 0x0600
#define _WIN32_IE 0x600 # undef _WIN32_IE
#endif
#if !defined(_WIN32_IE)
# define _WIN32_IE 0x0600 //required for NOTIFYICONDATA_V2_SIZE
#endif #endif
#include <private/qsystemlibrary_p.h> #include <private/qsystemlibrary_p.h>