aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--singleapplication.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/singleapplication.cpp b/singleapplication.cpp
index 58eee7c..7070973 100644
--- a/singleapplication.cpp
+++ b/singleapplication.cpp
@@ -82,9 +82,7 @@ void SingleApplicationPrivate::genBlockServerName( int timeout )
// Specifies size of the buffer on input
DWORD usernameLength = UNLEN + 1;
if( GetUserName( username, &usernameLength ) ) {
- char buffer[512];
- size_t length = wcstombs( buffer, username, 512 );
- appData.addData( buffer, length );
+ appData.addData( QString::fromWCharArray(username).toUtf8() );
} else {
appData.addData( QStandardPaths::standardLocations( QStandardPaths::HomeLocation ).join("").toUtf8() );
}