[vlc-devel] [PATCH 16/18] gui/qt: fix #17184 (missing entries in context-menu)

Filip Roséen filip at videolabs.io
Thu Jul 21 18:14:02 CEST 2016


On 2016-07-21 18:11, Francois Cartegnie wrote:
> Le 20/07/2016 à 12:00, Filip Roséen a écrit :
> 
>> -    const PLItem *item = getItem( index );
>> +    bool const b_readonly = THEPL->p_root->i_flags & 
>> PLAYLIST_RO_FLAG;
>> +    AbstractPLItem * item = VLCModel::getItem( index );
> 
> That's incorrect. Breaks everything on RO items.
> 
> - The playlist root is never RO.
> - The item itself can be RO in a non RO node.

But for item specific entities,  "item->readOnly()" is checked? The 
b_readonly is only used for non-item specific entities,
but if p_root is /never/ read-only that variable (and checks that use 
them) sure is redundant and should be removed.

Thank you.

> This was correct:
>> -    case ACTION_CREATENODE:
>> -            return ( isTree() && !item->readOnly() );
>> -    case ACTION_RENAMENODE:
>> -            return ( index != rootIndex() ) && !isLeaf( index ) && 
>> !item->readOnly();
> 
> Francois
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list