1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 01:09:42 +01:00

* Retrieve utf16 local appdata path from Windows API correctly.

This commit is contained in:
Christian Muehlhaeuser 2014-09-18 01:42:32 +02:00
parent 0e3341012b
commit ec137c3269

View File

@ -173,12 +173,12 @@ appDataDir()
if ( ( QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based ) == 0 )
{
// Use this for non-DOS-based Windowses
char acPath[MAX_PATH];
HRESULT h = SHGetFolderPathA( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE,
wchar_t acPath[MAX_PATH];
HRESULT h = SHGetFolderPathW( NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE,
NULL, 0, acPath );
if ( h == S_OK )
{
path = QString::fromLocal8Bit( acPath );
path = QString::fromUtf16( (ushort*)acPath );
}
}
#elif defined(Q_OS_MAC)