mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Fixed compilation error: cannot convert wchar_t* to LPSTR {aka char*} (#29)
This commit is contained in:
parent
d561026d83
commit
eee5d9544b
@ -99,7 +99,7 @@ void SingleApplicationPrivate::genBlockServerName( int timeout )
|
||||
wchar_t username [ UNLEN + 1 ];
|
||||
// Specifies size of the buffer on input
|
||||
DWORD usernameLength = UNLEN + 1;
|
||||
if( GetUserName( username, &usernameLength ) ) {
|
||||
if( GetUserNameW( username, &usernameLength ) ) {
|
||||
appData.addData( QString::fromWCharArray(username).toUtf8() );
|
||||
} else {
|
||||
appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() );
|
||||
|
Loading…
Reference in New Issue
Block a user