mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
* Retrieve utf16 local appdata path from Windows API correctly.
This commit is contained in:
@@ -173,12 +173,12 @@ appDataDir()
|
|||||||
if ( ( QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based ) == 0 )
|
if ( ( QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based ) == 0 )
|
||||||
{
|
{
|
||||||
// Use this for non-DOS-based Windowses
|
// Use this for non-DOS-based Windowses
|
||||||
char acPath[MAX_PATH];
|
wchar_t acPath[MAX_PATH];
|
||||||
HRESULT h = SHGetFolderPathA( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE,
|
HRESULT h = SHGetFolderPathW( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE,
|
||||||
NULL, 0, acPath );
|
NULL, 0, acPath );
|
||||||
if ( h == S_OK )
|
if ( h == S_OK )
|
||||||
{
|
{
|
||||||
path = QString::fromLocal8Bit( acPath );
|
path = QString::fromUtf16( (ushort*)acPath );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
|
Reference in New Issue
Block a user