mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix memory leak
call unicode version of the function directly
This commit is contained in:
parent
5608827429
commit
e1c9e3b9ed
1 changed files with 2 additions and 2 deletions
|
@ -363,8 +363,8 @@ QString Utils::Fs::QDesktopServicesDataLocation()
|
||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
LPWSTR path=new WCHAR[256];
|
wchar_t path[MAX_PATH + 1] = {L'\0'};
|
||||||
if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE))
|
if (SHGetSpecialFolderPathW(0, path, CSIDL_LOCAL_APPDATA, FALSE))
|
||||||
result = fromNativePath(QString::fromWCharArray(path));
|
result = fromNativePath(QString::fromWCharArray(path));
|
||||||
if (!QCoreApplication::applicationName().isEmpty())
|
if (!QCoreApplication::applicationName().isEmpty())
|
||||||
result += QLatin1String("/") + qApp->applicationName();
|
result += QLatin1String("/") + qApp->applicationName();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue