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

Rémi Denis-Courmont remi at remlab.net
Fri Jul 3 17:13:16 CEST 2015


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?

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list