From 9dcea027f16c4ce5852da3dfc8aca284c582bd7d Mon Sep 17 00:00:00 2001 From: sola.lu <sola.lu.greentest.com.cn> Date: 周五, 06 6月 2025 18:19:18 +0800 Subject: [PATCH] 1.注释掉custom margin,解决程序放大后,遮盖窗口底部内容的问题。 --- src/core/qwindowkit_windows.cpp | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp index a9cc371..640528c 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); @@ -69,26 +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); - } -#elif QT_VERSION < QT_VERSION_CHECK(6, 8, 1) - WindowsRegistryKey::WindowsRegistryKey(HKEY parentHandle, QStringView subKey, REGSAM permissions, REGSAM access) - : QWinRegistryKey(parentHandle, subKey, permissions, access) - { + return std::make_pair(value, ok); } #endif } \ No newline at end of file -- Gitblit v1.9.1