SingleApplication: Fallback to qgetenv for username on Windows too
This commit is contained in:
@@ -132,6 +132,9 @@ void SingleCoreApplicationPrivate::genBlockServerName() {
|
||||
if (GetUserNameW(username, &usernameLength)) {
|
||||
appData.addData(QString::fromWCharArray(username).toUtf8());
|
||||
}
|
||||
else {
|
||||
appData.addData(qgetenv("USERNAME"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user