From 51039917996909284fbc2d776a9b8f71fe5e6f9a Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: 周六, 02 12月 2023 17:43:17 +0800 Subject: [PATCH] wip --- src/core/qwindowkit_windows.cpp | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp index aeb2954..c8f8c2d 100644 --- a/src/core/qwindowkit_windows.cpp +++ b/src/core/qwindowkit_windows.cpp @@ -1,22 +1 @@ #include "qwindowkit_windows.h" - -namespace QWK { - - QString winErrorMessage(DWORD code) { - LPWSTR buf = nullptr; - if (::FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - nullptr, code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - reinterpret_cast<LPWSTR>(&buf), 0, nullptr) == 0) { - return {}; - } - const QString &errorText = QString::fromWCharArray(buf).trimmed(); - ::LocalFree(buf); - return errorText; - } - - QString winLastErrorMessage() { - return winErrorMessage(::GetLastError()); - } - -} \ No newline at end of file -- Gitblit v1.9.1