summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoperatingsystemversion_win.cpp
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2021-10-24 13:13:12 +0800
committerYuhang Zhao <2546789017@qq.com>2021-11-02 13:55:15 +0800
commit2526df506bda99f9497e83a4e6820557a722660e (patch)
tree48b45a8a8a5cf879b062354a92e02c9303d017f1 /src/corelib/global/qoperatingsystemversion_win.cpp
parent35ddf3498859dc184456346f2b070fe94dabaf26 (diff)
Remove pre-Win10 code paths in QtBase
Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src/corelib/global/qoperatingsystemversion_win.cpp')
-rw-r--r--src/corelib/global/qoperatingsystemversion_win.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/corelib/global/qoperatingsystemversion_win.cpp b/src/corelib/global/qoperatingsystemversion_win.cpp
index c514aaf54d..37f2362d0c 100644
--- a/src/corelib/global/qoperatingsystemversion_win.cpp
+++ b/src/corelib/global/qoperatingsystemversion_win.cpp
@@ -50,10 +50,7 @@ static inline OSVERSIONINFOEX determineWinOsVersion()
{
OSVERSIONINFOEX result = { sizeof(OSVERSIONINFOEX), 0, 0, 0, 0, {'\0'}, 0, 0, 0, 0, 0};
-#define GetProcAddressA GetProcAddress
-#define pGetModuleHandle GetModuleHandleW
-
- HMODULE ntdll = pGetModuleHandle(L"ntdll.dll");
+ HMODULE ntdll = GetModuleHandleW(L"ntdll.dll");
if (Q_UNLIKELY(!ntdll))
return result;
@@ -63,7 +60,7 @@ static inline OSVERSIONINFOEX determineWinOsVersion()
// because linking to it at load time will not pass the Windows App Certification Kit
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff561910.aspx
RtlGetVersionFunction pRtlGetVersion = reinterpret_cast<RtlGetVersionFunction>(
- reinterpret_cast<QFunctionPointer>(GetProcAddressA(ntdll, "RtlGetVersion")));
+ reinterpret_cast<QFunctionPointer>(GetProcAddress(ntdll, "RtlGetVersion")));
if (Q_UNLIKELY(!pRtlGetVersion))
return result;