2018-12-01 19:12:45 -05:00
|
|
|
#pragma once
|
2018-07-25 21:48:18 -07:00
|
|
|
|
2018-08-22 12:24:55 -04:00
|
|
|
#include "qtcommon.h"
|
2018-07-25 21:48:18 -07:00
|
|
|
|
2019-02-03 08:49:58 -05:00
|
|
|
struct QTextFile : QFile { QTextFile(QString name, QIODevice::OpenMode mode) : QFile(name) { open(mode | QIODevice::Text); } };
|
2018-12-22 16:17:08 -05:00
|
|
|
inline std::wstring S(const QString& S) { return { S.toStdWString() }; }
|
|
|
|
inline QString S(const std::wstring& S) { return QString::fromStdWString(S); }
|
2019-01-31 11:41:43 -05:00
|
|
|
inline HMODULE LoadLibraryOnce(std::wstring fileName) { if (HMODULE module = GetModuleHandleW(fileName.c_str())) return module; return LoadLibraryW(fileName.c_str()); }
|