mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-10 00:13:55 -04:00
windows: fix retrieval of user name and full name with special characters
This commit is contained in:
parent
3c57d28cfa
commit
b20e93c8e2
@ -1024,7 +1024,7 @@ QString QgsApplication::userLoginName()
|
||||
|
||||
if ( GetUserName( ( TCHAR * )name, &size ) )
|
||||
{
|
||||
sUserName = QString( name );
|
||||
sUserName = QString::fromLocal8Bit( name );
|
||||
}
|
||||
|
||||
#elif QT_CONFIG(process)
|
||||
@ -1060,7 +1060,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user