diff options
| author | tinyredpanda <39399309+tinyredpanda@users.noreply.github.com> | 2019-11-23 09:12:26 +0000 |
|---|---|---|
| committer | tinyredpanda <39399309+tinyredpanda@users.noreply.github.com> | 2019-11-23 13:23:46 +0000 |
| commit | 5dbabef355a00cc726cc08443c96517564f9bea0 (patch) | |
| tree | 8289fc869513744b495663eb23c015ca7fc83cff /Source/Core | |
| parent | a06da596e54b0860340cea584ab9d1bd337d0818 (diff) | |
Simplify wstring to QString conversion
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/Main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index b54caae0b8..55ea75f026 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -5,8 +5,6 @@ #ifdef _WIN32 #include <Windows.h> #include <cstdio> - -#include "Common/StringUtil.h" #endif #include <OptionParser.h> @@ -104,16 +102,16 @@ int main(int argc, char* argv[]) #ifdef _WIN32 // Get the default system font because Qt's way of obtaining it is outdated - NONCLIENTMETRICS metrics = {}; - LOGFONT& logfont = metrics.lfMenuFont; - metrics.cbSize = sizeof(NONCLIENTMETRICS); + NONCLIENTMETRICSW metrics = {}; + LOGFONTW& logfont = metrics.lfMenuFont; + metrics.cbSize = sizeof(metrics); - if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0)) + if (SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0)) { // Sadly Qt 5 doesn't support turning a native font handle into a QFont so this is the next best // thing QFont font = QApplication::font(); - font.setFamily(QString::fromStdString(UTF16ToUTF8(logfont.lfFaceName))); + font.setFamily(QString::fromStdWString(logfont.lfFaceName)); font.setItalic(logfont.lfItalic); font.setStrikeOut(logfont.lfStrikeOut); |
