MINGW-packages/mingw-w64-qt5-base/0026-fix-mingw-win32-winnt-detection.patch
مهدي شينون (Mehdi Chinoune) d3351b41cf qt5: update to 5.15.8 - Part1
2023-01-05 18:27:27 +01:00

29 lines
629 B
Diff

diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 67ba27f072..953c2a50a3 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -45,6 +45,11 @@
#pragma qt_sync_stop_processing
#endif
+#ifndef NOMINMAX
+# define NOMINMAX
+#endif
+#include <windows.h>
+
#if defined(Q_CC_MINGW)
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
# ifndef WINVER
@@ -58,11 +63,6 @@
# endif
#endif
-#ifndef NOMINMAX
-# define NOMINMAX
-#endif
-#include <windows.h>
-
#if defined(_WIN32_IE) && _WIN32_IE < 0x0501
# undef _WIN32_IE
#endif