hopefully fix windows compilation error
This commit is contained in:
parent
b9d7deb462
commit
4a667ae270
@ -46,10 +46,12 @@ bool PlatformBackend::filenameValid(QString name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString PlatformBackend::getCurrentUser() {
|
QString PlatformBackend::getCurrentUser() {
|
||||||
char username[UNLEN + 1];
|
LPWSTR username[UNLEN + 1];
|
||||||
DWORD username_len = UNLEN + 1;
|
DWORD username_len = UNLEN + 1;
|
||||||
GetUserName(username, &username_len);
|
QString userName;
|
||||||
QString userName = QString::fromLocal8Bit(username, username_len);
|
if (GetUserName(username, &username_len)) {
|
||||||
|
userName = QString::fromLocal8Bit(username, username_len);
|
||||||
|
}
|
||||||
delete[] username;
|
delete[] username;
|
||||||
return userName;
|
return userName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user