[vlc-commits] Qt: playlist enqueue, use the Open:: helper
Jean-Baptiste Kempf
git at videolan.org
Sun May 18 17:05:35 CEST 2014
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 18 17:05:00 2014 +0200| [ff007ad18e482260c6e0f775a073855f24582614] | committer: Jean-Baptiste Kempf
Qt: playlist enqueue, use the Open:: helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff007ad18e482260c6e0f775a073855f24582614
---
.../gui/qt4/components/playlist/playlist_model.cpp | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index c1444cd..ed53406 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -941,16 +941,10 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
case ACTION_ENQUEUEDIR:
if( a.uris.isEmpty() ) break;
- p_input = input_item_New( a.uris.first().toLatin1().constData(), NULL );
- if( unlikely( p_input == NULL ) ) break;
-
- /* FIXME: playlist_AddInput() can fail */
- playlist_AddInput( THEPL, p_input,
- PLAYLIST_APPEND,
- PLAYLIST_END,
- getPLRootType() == ROOTTYPE_CURRENT_PLAYING,
- pl_Unlocked );
- vlc_gc_decref( p_input );
+
+ Open::openMRL( p_intf, a.uris.first().toLatin1().constData(),
+ false, getPLRootType() == ROOTTYPE_CURRENT_PLAYING );
+
return true;
case ACTION_ENQUEUEGENERIC:
@@ -966,11 +960,7 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
VLC_INPUT_OPTION_TRUSTED );
}
- /* FIXME: playlist_AddInput() can fail */
- playlist_AddInput( THEPL, p_input,
- PLAYLIST_APPEND | PLAYLIST_PREPARSE,
- PLAYLIST_END, true, pl_Unlocked );
- vlc_gc_decref( p_input );
+ Open::openInput( p_intf, p_input, uri, false );
}
return true;
More information about the vlc-commits
mailing list