summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qt_windows.h13
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp3
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp4
-rw-r--r--src/widgets/util/qsystemtrayicon_win.cpp14
4 files changed, 20 insertions, 14 deletions
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 4bd8d60754..00a511a96f 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -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
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp
index a0434fb6f3..805046c715 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ b/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -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
diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp
index 70750c6006..d073867dbb 100644
--- a/src/widgets/itemviews/qfileiconprovider.cpp
+++ b/src/widgets/itemviews/qfileiconprovider.cpp
@@ -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>
diff --git a/src/widgets/util/qsystemtrayicon_win.cpp b/src/widgets/util/qsystemtrayicon_win.cpp
index 108e65a2d1..896d5c2213 100644
--- a/src/widgets/util/qsystemtrayicon_win.cpp
+++ b/src/widgets/util/qsystemtrayicon_win.cpp
@@ -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>