[vlc-devel] [PATCH 4/7] Qt: fix memory leaks

Sergey Radionov rsatom at gmail.com
Fri Jul 3 18:04:11 CEST 2015


2015-07-03 21:13 GMT+06:00 Rémi Denis-Courmont <remi at remlab.net>:

> Le 2015-07-03 18:04, Francois Cartegnie a écrit :
>
>> Le 03/07/2015 14:45, Hannes Domani a écrit :
>>
>> Hi,
>>
>>
>>  diff --git a/modules/gui/qt4/components/open_panels.cpp
>>> b/modules/gui/qt4/components/open_panels.cpp
>>> index 6b88b5e..66b0994 100644
>>> --- a/modules/gui/qt4/components/open_panels.cpp
>>> +++ b/modules/gui/qt4/components/open_panels.cpp
>>> @@ -386,13 +386,15 @@ void DiscOpenPanel::onFocus()
>>>                  wchar_t psz_name[512] = L"";
>>>                  GetVolumeInformationW( drive, psz_name, 511, NULL,
>>> NULL, NULL, NULL, 0 );
>>>
>>> -                QString displayName = FromWide( drive );
>>> +                char *psz_drive = FromWide( drive );
>>> +                QString displayName = psz_drive;
>>>
>>
>> Someone here would say auto casting is evil.
>>
>
> There should be a wchar_t to QString conversion function anyway, no?
>

QString::fromWCharArray: http://doc.qt.io/qt-5/qstring.html#fromWCharArray


>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150703/b094b6f6/attachment.html>


More information about the vlc-devel mailing list