From 00a442de5408674fd2b6a3b87a3f43fb5ad6f1b3 Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: Sat, 30 Sep 2023 19:14:37 +0800 Subject: [PATCH] minor tweaks --- .../Core/private/framelesshelpercore_global_p.h | 2 +- src/core/utils_win.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/FramelessHelper/Core/private/framelesshelpercore_global_p.h b/include/FramelessHelper/Core/private/framelesshelpercore_global_p.h index 892e041..4ce2607 100644 --- a/include/FramelessHelper/Core/private/framelesshelpercore_global_p.h +++ b/include/FramelessHelper/Core/private/framelesshelpercore_global_p.h @@ -117,7 +117,7 @@ enum class ExtraDataType : quint8 }; #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -inline uint qHash(ExtraDataType key, uint seed = 0) noexcept { +inline uint qHash(const ExtraDataType key, const uint seed = 0) noexcept { return ::qHash(static_cast(key), seed); } #endif diff --git a/src/core/utils_win.cpp b/src/core/utils_win.cpp index 459f335..c65bc1c 100644 --- a/src/core/utils_win.cpp +++ b/src/core/utils_win.cpp @@ -1221,9 +1221,9 @@ QString Utils::getSystemErrorMessage(const QString &function) if (function.isEmpty()) { return {}; } - const DWORD code = GetLastError(); + const DWORD code = ::GetLastError(); if (code == ERROR_SUCCESS) { - return {}; + return kSuccessMessageText; } return getSystemErrorMessageImpl(function, code); }