Skip to content

Commit

Permalink
Fixed compilation error: cannot convert wchar_t* to LPSTR {aka char*} (
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitozz authored and itay-grudev committed Feb 23, 2017
1 parent d561026 commit eee5d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion singleapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit eee5d95

Please sign in to comment.