Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)
And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time, to unblock the developers from accessing the latest Windows APIs. Pick-to: 6.2 Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
a8be40bd64
commit
6652bf2353
@ -138,9 +138,34 @@ VERS_1;
|
|||||||
set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support")
|
set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(qt_internal_ensure_latest_win_nt_api)
|
||||||
|
if(NOT WIN32)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
check_cxx_source_compiles([=[
|
||||||
|
#include <windows.h>
|
||||||
|
#if !defined(_WIN32_WINNT) && !defined(WINVER)
|
||||||
|
#error "_WIN32_WINNT and WINVER are not defined"
|
||||||
|
#endif
|
||||||
|
#if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0A00)
|
||||||
|
#error "_WIN32_WINNT version too low"
|
||||||
|
#endif
|
||||||
|
#if defined(WINVER) && (WINVER < 0x0A00)
|
||||||
|
#error "WINVER version too low"
|
||||||
|
#endif
|
||||||
|
int main() { return 0; }
|
||||||
|
]=] HAVE_WIN10_WIN32_WINNT)
|
||||||
|
if(NOT HAVE_WIN10_WIN32_WINNT)
|
||||||
|
list(APPEND QT_PLATFORM_DEFINITIONS _WIN32_WINNT=0x0A00 WINVER=0x0A00)
|
||||||
|
set(QT_PLATFORM_DEFINITIONS ${QT_PLATFORM_DEFINITIONS}
|
||||||
|
CACHE STRING "Qt platform specific pre-processor defines" FORCE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(qt_run_qtbase_config_tests)
|
function(qt_run_qtbase_config_tests)
|
||||||
qt_run_config_test_architecture()
|
qt_run_config_test_architecture()
|
||||||
qt_run_linker_version_script_support()
|
qt_run_linker_version_script_support()
|
||||||
|
qt_internal_ensure_latest_win_nt_api()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# The qmake build of android does not perform the right architecture tests and
|
# The qmake build of android does not perform the right architecture tests and
|
||||||
|
@ -310,7 +310,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS _WIN32_WINNT=0x0601 MINGW_HAS_SECURE_API=1)
|
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS MINGW_HAS_SECURE_API=1)
|
||||||
endif()
|
endif()
|
||||||
elseif(LINUX)
|
elseif(LINUX)
|
||||||
if(GCC)
|
if(GCC)
|
||||||
|
@ -345,4 +345,9 @@ msvc {
|
|||||||
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /GUARD:CF
|
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /GUARD:CF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
DEFINES *= _WIN32_WINNT=0x0A00
|
||||||
|
DEFINES *= WINVER=0x0A00
|
||||||
|
}
|
||||||
|
|
||||||
TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end
|
TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end
|
||||||
|
@ -45,17 +45,17 @@
|
|||||||
#pragma qt_sync_stop_processing
|
#pragma qt_sync_stop_processing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_CC_MINGW)
|
|
||||||
// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
|
|
||||||
#ifndef WINVER
|
#ifndef WINVER
|
||||||
# define WINVER 0x601
|
# define WINVER 0x0A00 // _WIN32_WINNT_WIN10
|
||||||
#endif
|
#endif
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
# define _WIN32_WINNT 0x601
|
# define _WIN32_WINNT 0x0A00
|
||||||
|
#endif
|
||||||
|
#ifndef _WIN32_IE
|
||||||
|
# define _WIN32_IE 0x0A00
|
||||||
#endif
|
#endif
|
||||||
#ifndef NTDDI_VERSION
|
#ifndef NTDDI_VERSION
|
||||||
# define NTDDI_VERSION 0x06010000
|
# define NTDDI_VERSION 0x0A00000B // NTDDI_WIN10_CO
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
@ -63,13 +63,6 @@
|
|||||||
#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
|
|
||||||
|
|
||||||
// already defined when compiled with WINVER >= 0x0500
|
// already defined when compiled with WINVER >= 0x0500
|
||||||
#ifndef SPI_SETMENUANIMATION
|
#ifndef SPI_SETMENUANIMATION
|
||||||
#define SPI_SETMENUANIMATION 0x1003
|
#define SPI_SETMENUANIMATION 0x1003
|
||||||
|
@ -627,15 +627,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
|
|||||||
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
|
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
|
// File ID for Windows up to version 7 and FAT32 drives
|
||||||
static inline QByteArray fileId(HANDLE handle)
|
static inline QByteArray fileId(HANDLE handle)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#if defined(Q_CC_MINGW) || defined(Q_CC_CLANG)
|
#if defined(Q_CC_MINGW) || defined(Q_CC_CLANG)
|
||||||
# define HAS_UI_VIEW_SETTINGS_INTEROP
|
# define HAS_UI_VIEW_SETTINGS_INTEROP
|
||||||
// Present from MSVC2015 + SDK 10 onwards
|
// 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_INTEROP
|
||||||
# define HAS_UI_VIEW_SETTINGS
|
# define HAS_UI_VIEW_SETTINGS
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#define QT_NO_URL_CAST_FROM_STRING 1
|
#define QT_NO_URL_CAST_FROM_STRING 1
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0601
|
#define _WIN32_WINNT 0x0A00
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qwindowscombase.h"
|
#include "qwindowscombase.h"
|
||||||
|
@ -37,11 +37,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(WINVER) && WINVER < 0x0603
|
#ifndef WINVER
|
||||||
# undef WINVER
|
# define WINVER 0x0A00 // Enable pointer functions for MinGW
|
||||||
#endif
|
|
||||||
#if !defined(WINVER)
|
|
||||||
# define WINVER 0x0603 // Enable pointer functions for MinGW
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qwindowspointerhandler.h"
|
#include "qwindowspointerhandler.h"
|
||||||
|
@ -37,18 +37,12 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(WINVER) && WINVER < 0x0601
|
#ifndef WINVER
|
||||||
# undef WINVER
|
# define WINVER 0x0A00 // required for NOTIFYICONDATA_V2_SIZE, ChangeWindowMessageFilterEx() (MinGW 5.3)
|
||||||
#endif
|
|
||||||
#if !defined(WINVER)
|
|
||||||
# define WINVER 0x0601 // required for NOTIFYICONDATA_V2_SIZE, ChangeWindowMessageFilterEx() (MinGW 5.3)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NTDDI_VERSION) && NTDDI_VERSION < 0x06010000
|
#ifndef NTDDI_VERSION
|
||||||
# undef NTDDI_VERSION
|
# define NTDDI_VERSION 0x0A00000B // required for Shell_NotifyIconGetRect (MinGW 5.3)
|
||||||
#endif
|
|
||||||
#if !defined(NTDDI_VERSION)
|
|
||||||
# define NTDDI_VERSION 0x06010000 // required for Shell_NotifyIconGetRect (MinGW 5.3)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qwindowssystemtrayicon.h"
|
#include "qwindowssystemtrayicon.h"
|
||||||
|
@ -38,9 +38,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
// SHSTOCKICONINFO is only available since Vista
|
// SHSTOCKICONINFO is only available since Vista
|
||||||
#if _WIN32_WINNT < 0x0601
|
#ifndef _WIN32_WINNT
|
||||||
# undef _WIN32_WINNT
|
# define _WIN32_WINNT 0x0A00
|
||||||
# define _WIN32_WINNT 0x0601
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qwindowstheme.h"
|
#include "qwindowstheme.h"
|
||||||
|
@ -37,11 +37,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(WINVER) && WINVER < 0x0601
|
#ifndef WINVER
|
||||||
# undef WINVER
|
# define WINVER 0x0A00 // Enable touch functions for MinGW
|
||||||
#endif
|
|
||||||
#if !defined(WINVER)
|
|
||||||
# define WINVER 0x0601 // Enable touch functions for MinGW
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qwindowswindow.h"
|
#include "qwindowswindow.h"
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(_WIN32_WINNT)
|
#if defined(Q_OS_WIN) && !defined(_WIN32_WINNT)
|
||||||
#define _WIN32_WINNT 0x500
|
#define _WIN32_WINNT 0x0A00
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../../../shared/filesystem.h"
|
#include "../../../../shared/filesystem.h"
|
||||||
|
@ -76,7 +76,9 @@ void NativeMutexUnlock(NativeMutexType *mutex)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
# define _WIN32_WINNT 0x0400
|
# if !defined(_WIN32_WINNT)
|
||||||
|
# define _WIN32_WINNT 0x0A00
|
||||||
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
typedef CRITICAL_SECTION NativeMutexType;
|
typedef CRITICAL_SECTION NativeMutexType;
|
||||||
void NativeMutexInitialize(NativeMutexType *mutex)
|
void NativeMutexInitialize(NativeMutexType *mutex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user