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
// unusable WinSDK standard dialogs
#ifndef WINVER
#define WINVER 0x400
# define WINVER 0x0501
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x400
# define _WIN32_WINNT 0x0501
#endif
#endif
#if defined(Q_CC_MINGW)
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
#ifndef WINVER
#define WINVER 0x500
# define WINVER 0x501
#endif
#endif
@ -65,6 +65,13 @@
#endif
#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
#include <ceconfig.h>
#endif

View File

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

View File

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

View File

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