From ac1a62b2a76e4d15e412b9579b80da2dafbc6d6a Mon Sep 17 00:00:00 2001
From: SineStriker <55847490+SineStriker@users.noreply.github.com>
Date: 周一, 19 5月 2025 15:38:12 +0800
Subject: [PATCH] Update qmsetup

---
 src/core/qwindowkit_windows.cpp |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp
index b28e4e0..640528c 100644
--- a/src/core/qwindowkit_windows.cpp
+++ b/src/core/qwindowkit_windows.cpp
@@ -1,12 +1,18 @@
+// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
+// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
+// SPDX-License-Identifier: Apache-2.0
+
 #include "qwindowkit_windows.h"
 
 namespace QWK {
 
     static RTL_OSVERSIONINFOW GetRealOSVersionImpl() {
         HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
+        Q_ASSERT(hMod);
         using RtlGetVersionPtr = NTSTATUS(WINAPI *)(PRTL_OSVERSIONINFOW);
         auto pRtlGetVersion =
             reinterpret_cast<RtlGetVersionPtr>(::GetProcAddress(hMod, "RtlGetVersion"));
+        Q_ASSERT(pRtlGetVersion);
         RTL_OSVERSIONINFOW rovi{};
         rovi.dwOSVersionInfoSize = sizeof(rovi);
         pRtlGetVersion(&rovi);
@@ -65,22 +71,21 @@
         return result;
     }
 
-    QPair<DWORD, bool> WindowsRegistryKey::dwordValue(QStringView subKey) const {
+    std::pair<DWORD, bool> WindowsRegistryKey::dwordValue(QStringView subKey) const {
         if (!isValid())
-            return qMakePair(0, false);
+            return std::make_pair(0, false);
         DWORD type;
         auto subKeyC = reinterpret_cast<const wchar_t *>(subKey.utf16());
         if (::RegQueryValueExW(m_key, subKeyC, nullptr, &type, nullptr, nullptr) != ERROR_SUCCESS ||
             type != REG_DWORD) {
-            return qMakePair(0, false);
+            return std::make_pair(0, false);
         }
         DWORD value = 0;
         DWORD size = sizeof(value);
         const bool ok =
             ::RegQueryValueExW(m_key, subKeyC, nullptr, nullptr,
                                reinterpret_cast<unsigned char *>(&value), &size) == ERROR_SUCCESS;
-        return qMakePair(value, ok);
+        return std::make_pair(value, ok);
     }
 #endif
-
 }
\ No newline at end of file

--
Gitblit v1.9.1