[vlc-devel] [PATCH 3/3] Add file dialogue to manually set album art.

Angelo Haller vlc-devel at szanni.org
Wed Aug 8 10:23:29 CEST 2012


On 08/05/2012 11:32 PM, Jean-Baptiste Kempf wrote:
> On Tue, Jul 31, 2012 at 02:34:04PM +0200, Angelo Haller wrote :
>> +    CONNECT( THEMIM->getIM(), artChanged( QString ), this, enterEditMode() );
> This seems dubious, like very dubious.

Any reason? I thought it would be useful to be able to save the artwork
when it is changed. Either by setting an artwork manually or when an
artwork is downloaded from the net.
Or what seemed dubious to you?

>
>> +    QString filePath = QFileDialog::getOpenFileName( this, qtr( "Choose Image" ),
>> +        p_intf->p_sys->filepath, qtr( "Image Files (*.gif *.jpg *.jpeg *.png)" ) );
> Are you sure about the qtr use here?
>

No. But what else should I use for translation? qtr() is used everywhere in
modules/gui/qt4/*.
The qt docs use tr() but I only found two instances of tr() in the whole
vlc source tree.
Maybe I am mistaken but it looks fine to me.

>> +        if( old_url.startsWith( QString::fromUtf8( psz_cachedir ) ) )
>> +            QFile( old_url ).remove(); /* Purge cached artwork */
> Not leaking anythin here ?
>
> Best regards,
>

Leaking in the sense of? Memory? I don't think so.
Or missing cached files? The path to the file should be saved in
the artwork url so it should be deleted here.

Kind regards



More information about the vlc-devel mailing list