minor tweaks

This commit is contained in:
Zhao Yuhang 2023-09-30 19:14:37 +08:00
parent cb37fc66f4
commit 00a442de54
2 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ enum class ExtraDataType : quint8
}; };
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) #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<quint8>(key), seed); return ::qHash(static_cast<quint8>(key), seed);
} }
#endif #endif

View File

@ -1221,9 +1221,9 @@ QString Utils::getSystemErrorMessage(const QString &function)
if (function.isEmpty()) { if (function.isEmpty()) {
return {}; return {};
} }
const DWORD code = GetLastError(); const DWORD code = ::GetLastError();
if (code == ERROR_SUCCESS) { if (code == ERROR_SUCCESS) {
return {}; return kSuccessMessageText;
} }
return getSystemErrorMessageImpl(function, code); return getSystemErrorMessageImpl(function, code);
} }