diff --git a/GUI/extenwindow.cpp b/GUI/extenwindow.cpp index fb09bd9..0c6450d 100644 --- a/GUI/extenwindow.cpp +++ b/GUI/extenwindow.cpp @@ -1,7 +1,6 @@ #include "extenwindow.h" #include "ui_extenwindow.h" #include "defs.h" -#include "misc.h" #include #include #include diff --git a/GUI/main.cpp b/GUI/main.cpp index 9aac425..af40260 100644 --- a/GUI/main.cpp +++ b/GUI/main.cpp @@ -1,5 +1,4 @@ #include "mainwindow.h" -#include "misc.h" #include "host/util.h" #include diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 6fd3145..c9c36c9 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -2,7 +2,6 @@ #include "ui_mainwindow.h" #include "defs.h" #include "extenwindow.h" -#include "misc.h" #include "host/util.h" #include #include diff --git a/GUI/misc.h b/GUI/misc.h deleted file mode 100644 index 524f1fa..0000000 --- a/GUI/misc.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include "qtcommon.h" - -struct QTextFile : QFile { QTextFile(QString name, QIODevice::OpenMode mode) : QFile(name) { open(mode | QIODevice::Text); } }; -inline std::wstring S(const QString& S) { return { S.toStdWString() }; } -inline QString S(const std::wstring& S) { return QString::fromStdWString(S); } -inline HMODULE LoadLibraryOnce(std::wstring fileName) { if (HMODULE module = GetModuleHandleW(fileName.c_str())) return module; return LoadLibraryW(fileName.c_str()); } diff --git a/GUI/qtcommon.h b/GUI/qtcommon.h index 91d810c..83594b2 100644 --- a/GUI/qtcommon.h +++ b/GUI/qtcommon.h @@ -11,3 +11,8 @@ #include #include #include + +struct QTextFile : QFile { QTextFile(QString name, QIODevice::OpenMode mode) : QFile(name) { open(mode | QIODevice::Text); } }; +inline std::wstring S(const QString& S) { return { S.toStdWString() }; } +inline QString S(const std::wstring& S) { return QString::fromStdWString(S); } +inline HMODULE LoadLibraryOnce(std::wstring fileName) { if (HMODULE module = GetModuleHandleW(fileName.c_str())) return module; return LoadLibraryW(fileName.c_str()); }