Skip to content

Commit

Permalink
windows: fix retrieval of user name and full name with special charac…
Browse files Browse the repository at this point in the history
…ters

(cherry picked from commit b20e93c)
  • Loading branch information
jef-n committed Jun 21, 2019
1 parent 8498bbd commit 7afc546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -989,7 +989,7 @@ QString QgsApplication::userLoginName()

if ( GetUserName( ( TCHAR * )name, &size ) )
{
sUserName = QString( name );
sUserName = QString::fromLocal8Bit( name );
}

#else
Expand Down Expand Up @@ -1025,7 +1025,7 @@ QString QgsApplication::userFullName()
//note - this only works for accounts connected to domain
if ( GetUserNameEx( NameDisplay, ( TCHAR * )name, &size ) )
{
sUserFullName = QString( name );
sUserFullName = QString::fromLocal8Bit( name );
}

//fall back to login name
Expand Down

0 comments on commit 7afc546

Please sign in to comment.