[vlc-devel] [PATCH] Patch to add a button to clear the playlist (#4999)

Jean-Baptiste Kempf jb at videolan.org
Tue Nov 22 12:33:38 CET 2011


On Tue, Nov 22, 2011 at 06:28:49AM -0500, Edward Wang wrote :
> This patch will add a new feature to clear the playlist in one click, as
> per bug #4999 (http://trac.videolan.org/vlc/ticket/4999) and the GCI task.
> Attached is the patch file.

Good job. Review inline.

> +    
Trailing spaces.

> +void PlaylistWidget::clearPlaylist()
> +{
> +    PLModel *model = PLModel::getPLModel( p_intf );
> +    if(model->rowCount() < 1) return;

Weird spacing style around the if

> +    msg_Info( p_intf, "There are currently %d items in the playlist\n",model->rowCount() );
Unnecessary.

> +    QModelIndexList* l = new QModelIndexList();
> +    for(int i = 0; i <= model->rowCount(); i++) {
foreach might be more elegant.

> +        QModelIndex indexrecord = model->index(i,0,QModelIndex());
weird spacing

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list