summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qt_windows.h29
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp9
-rw-r--r--src/plugins/platforms/windows/qwin10helpers.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowssystemtrayicon.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp5
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp7
8 files changed, 23 insertions, 52 deletions
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 7ffe313f006..15255b94347 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -45,17 +45,17 @@
#pragma qt_sync_stop_processing
#endif
-#if defined(Q_CC_MINGW)
-// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
-# ifndef WINVER
-# define WINVER 0x601
-# endif
-# ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x601
-# endif
-# ifndef NTDDI_VERSION
-# define NTDDI_VERSION 0x06010000
-# endif
+#ifndef WINVER
+# define WINVER 0x0A00 // _WIN32_WINNT_WIN10
+#endif
+#ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0A00
+#endif
+#ifndef _WIN32_IE
+# define _WIN32_IE 0x0A00
+#endif
+#ifndef NTDDI_VERSION
+# define NTDDI_VERSION 0x0A00000B // NTDDI_WIN10_CO
#endif
#ifndef NOMINMAX
@@ -63,13 +63,6 @@
#endif
#include <windows.h>
-#if defined(_WIN32_IE) && _WIN32_IE < 0x0501
-# undef _WIN32_IE
-#endif
-#if !defined(_WIN32_IE)
-# define _WIN32_IE 0x0501
-#endif
-
// already defined when compiled with WINVER >= 0x0500
#ifndef SPI_SETMENUANIMATION
#define SPI_SETMENUANIMATION 0x1003
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 9e009a05e7d..d2da2082fa3 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -627,15 +627,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
}
-#if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8 // Windows 8 onwards
-
-typedef struct _FILE_ID_INFO {
- ULONGLONG VolumeSerialNumber;
- FILE_ID_128 FileId;
-} FILE_ID_INFO, *PFILE_ID_INFO;
-
-#endif // if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8
-
// File ID for Windows up to version 7 and FAT32 drives
static inline QByteArray fileId(HANDLE handle)
{
diff --git a/src/plugins/platforms/windows/qwin10helpers.cpp b/src/plugins/platforms/windows/qwin10helpers.cpp
index 9a7fce9cd5c..b8e834d54f6 100644
--- a/src/plugins/platforms/windows/qwin10helpers.cpp
+++ b/src/plugins/platforms/windows/qwin10helpers.cpp
@@ -46,7 +46,7 @@
#if defined(Q_CC_MINGW) || defined(Q_CC_CLANG)
# define HAS_UI_VIEW_SETTINGS_INTEROP
// Present from MSVC2015 + SDK 10 onwards
-#elif (!defined(Q_CC_MSVC) || _MSC_VER >= 1900) && NTDDI_VERSION >= 0xa000000
+#elif (!defined(Q_CC_MSVC) || _MSC_VER >= 1900) && WINVER >= 0x0A00
# define HAS_UI_VIEW_SETTINGS_INTEROP
# define HAS_UI_VIEW_SETTINGS
#endif
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 1ddde93f909..55241294188 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -40,7 +40,7 @@
#define QT_NO_URL_CAST_FROM_STRING 1
#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0601
+#define _WIN32_WINNT 0x0A00
#endif
#include "qwindowscombase.h"
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 46fbfcc8d69..efe02139f13 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -37,11 +37,8 @@
**
****************************************************************************/
-#if defined(WINVER) && WINVER < 0x0603
-# undef WINVER
-#endif
-#if !defined(WINVER)
-# define WINVER 0x0603 // Enable pointer functions for MinGW
+#ifndef WINVER
+# define WINVER 0x0A00 // Enable pointer functions for MinGW
#endif
#include "qwindowspointerhandler.h"
diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
index 7c473e66b67..0a96d5a0f5b 100644
--- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
@@ -37,18 +37,12 @@
**
****************************************************************************/
-#if defined(WINVER) && WINVER < 0x0601
-# undef WINVER
-#endif
-#if !defined(WINVER)
-# define WINVER 0x0601 // required for NOTIFYICONDATA_V2_SIZE, ChangeWindowMessageFilterEx() (MinGW 5.3)
+#ifndef WINVER
+# define WINVER 0x0A00 // required for NOTIFYICONDATA_V2_SIZE, ChangeWindowMessageFilterEx() (MinGW 5.3)
#endif
-#if defined(NTDDI_VERSION) && NTDDI_VERSION < 0x06010000
-# undef NTDDI_VERSION
-#endif
-#if !defined(NTDDI_VERSION)
-# define NTDDI_VERSION 0x06010000 // required for Shell_NotifyIconGetRect (MinGW 5.3)
+#ifndef NTDDI_VERSION
+# define NTDDI_VERSION 0x0A00000B // required for Shell_NotifyIconGetRect (MinGW 5.3)
#endif
#include "qwindowssystemtrayicon.h"
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 6fbf4183da8..85b6c300861 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -38,9 +38,8 @@
****************************************************************************/
// SHSTOCKICONINFO is only available since Vista
-#if _WIN32_WINNT < 0x0601
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601
+#ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0A00
#endif
#include "qwindowstheme.h"
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 92cf8c253e4..5988d1498de 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -37,11 +37,8 @@
**
****************************************************************************/
-#if defined(WINVER) && WINVER < 0x0601
-# undef WINVER
-#endif
-#if !defined(WINVER)
-# define WINVER 0x0601 // Enable touch functions for MinGW
+#ifndef WINVER
+# define WINVER 0x0A00 // Enable touch functions for MinGW
#endif
#include "qwindowswindow.h"