From c9261fbd7019264e8543507e3afaec63d55595a2 Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周三, 06 12月 2023 10:58:07 +0800
Subject: [PATCH] fix stupid code

---
 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