group common stuff

This commit is contained in:
Akash Mozumdar 2019-03-13 11:44:21 -04:00
parent 7e8dfc0332
commit 09552fe7c7
5 changed files with 5 additions and 11 deletions

View File

@ -1,7 +1,6 @@
#include "extenwindow.h" #include "extenwindow.h"
#include "ui_extenwindow.h" #include "ui_extenwindow.h"
#include "defs.h" #include "defs.h"
#include "misc.h"
#include <concrt.h> #include <concrt.h>
#include <QDragEnterEvent> #include <QDragEnterEvent>
#include <QDropEvent> #include <QDropEvent>

View File

@ -1,5 +1,4 @@
#include "mainwindow.h" #include "mainwindow.h"
#include "misc.h"
#include "host/util.h" #include "host/util.h"
#include <QApplication> #include <QApplication>

View File

@ -2,7 +2,6 @@
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "defs.h" #include "defs.h"
#include "extenwindow.h" #include "extenwindow.h"
#include "misc.h"
#include "host/util.h" #include "host/util.h"
#include <shellapi.h> #include <shellapi.h>
#include <winhttp.h> #include <winhttp.h>

View File

@ -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()); }

View File

@ -11,3 +11,8 @@
#include <QDir> #include <QDir>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSettings> #include <QSettings>
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()); }