[vlc-commits] gui/qt: use function that conditionally returns an item in PLModel:: isSupported
Filip Roséen
git at videolan.org
Sun Jul 24 20:39:14 CEST 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Sun Jul 24 15:00:52 2016 +0200| [fcd81218102abbdc13bc99ea925f7c8f62674acc] | committer: Francois Cartegnie
gui/qt: use function that conditionally returns an item in PLModel::isSupported
PLModel::getItem, which was used prior to this commit, will return
either the item associated with an index, or the item referring to the
associated playlist (currently in flight).
Given that we have options that shall only be available if the index is
associated with a given item, simply having a check to see whether
"item" is not null will ease implementation (the alternative is to
compare it to "rootItem", which is redundant).
Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fcd81218102abbdc13bc99ea925f7c8f62674acc
---
modules/gui/qt/components/playlist/playlist_model.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 0f2ce33..54f3253 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -1001,7 +1001,7 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) const
{
- const PLItem *item = getItem( index );
+ AbstractPLItem const* item = VLCModel::getItem( index );
switch ( action )
{
More information about the vlc-commits
mailing list