[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:09:08 CEST 2016
On 2016-07-21 17:59, Jean-Baptiste Kempf wrote:
>> bool PLModel::isSupportedAction( actions action, const QModelIndex
>> &index ) const
>> {
>> - if( !index.isValid() )
>> - return false;
>> + vlc_playlist_locker pl_lock ( THEPL );
>
> Why remove the call to isValid here?
Because "index.isValid()" yields false if you right-click on an empty
area (ie. not on an entity within the (gui-)playlist, a QModelIndex is
only valid if it refers to an actual item within the list.
- http://doc.qt.io/qt-4.8/qmodelindex.html#isValid
More information about the vlc-devel
mailing list