From 9e96ea43436d5ed200c57d6b229cddf9bdf9e55a Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周一, 10 2月 2025 18:06:41 +0800
Subject: [PATCH] make demo a GUI application in CMake

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

diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp
index a9cc371..58c3d0f 100644
--- a/src/core/qwindowkit_windows.cpp
+++ b/src/core/qwindowkit_windows.cpp
@@ -8,9 +8,11 @@
 
     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);
@@ -84,11 +86,6 @@
             ::RegQueryValueExW(m_key, subKeyC, nullptr, nullptr,
                                reinterpret_cast<unsigned char *>(&value), &size) == ERROR_SUCCESS;
         return qMakePair(value, ok);
-    }
-#elif QT_VERSION < QT_VERSION_CHECK(6, 8, 1)
-    WindowsRegistryKey::WindowsRegistryKey(HKEY parentHandle, QStringView subKey, REGSAM permissions, REGSAM access)
-        : QWinRegistryKey(parentHandle, subKey, permissions, access)
-    {
     }
 #endif
 }
\ No newline at end of file

--
Gitblit v1.9.1