From 469c975a708ed86c834b59ed751a4548c693a7b9 Mon Sep 17 00:00:00 2001 From: 李威 wei.li <108964761+liwey1985@users.noreply.github.com> Date: 周一, 21 4月 2025 15:34:54 +0800 Subject: [PATCH] Fix NSWindowProxy::setSystemButtonVisible not taking effect (#175) --- src/core/qwindowkit_windows.cpp | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp index c022e26..640528c 100644 --- a/src/core/qwindowkit_windows.cpp +++ b/src/core/qwindowkit_windows.cpp @@ -71,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