mirror of
https://github.com/c0re100/qBittorrent-Enhanced-Edition.git
synced 2025-01-09 04:18:39 +08:00
Fix memory leak
call unicode version of the function directly
This commit is contained in:
parent
5608827429
commit
e1c9e3b9ed
@ -363,8 +363,8 @@ QString Utils::Fs::QDesktopServicesDataLocation()
|
||||
{
|
||||
QString result;
|
||||
#ifdef Q_OS_WIN
|
||||
LPWSTR path=new WCHAR[256];
|
||||
if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE))
|
||||
wchar_t path[MAX_PATH + 1] = {L'\0'};
|
||||
if (SHGetSpecialFolderPathW(0, path, CSIDL_LOCAL_APPDATA, FALSE))
|
||||
result = fromNativePath(QString::fromWCharArray(path));
|
||||
if (!QCoreApplication::applicationName().isEmpty())
|
||||
result += QLatin1String("/") + qApp->applicationName();
|
||||
|
Loading…
Reference in New Issue
Block a user