mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-23 13:55:36 +08:00
Update qtcommon.h
This commit is contained in:
parent
24ae167d1a
commit
d3babbea76
@ -32,8 +32,9 @@ struct Localizer { Localizer() { Localize(); } };
|
||||
inline std::wstring S(const QString& s) {
|
||||
//s.toStdWString will crash. unknown why.
|
||||
std::wstring ws;
|
||||
ws.resize(s.size());
|
||||
ws.resize(s.size()+1);
|
||||
s.toWCharArray(ws.data());
|
||||
ws.resize(s.size());
|
||||
return ws;
|
||||
}
|
||||
inline QString S(const std::string& s) { return QString::fromStdString(s); }
|
||||
|
Loading…
Reference in New Issue
Block a user