[vlc-commits] Qt: move playMRL slot from THEDP to RecentsMRL

Jean-Baptiste Kempf git at videolan.org
Sun May 18 16:42:52 CEST 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 18 14:50:24 2014 +0200| [04cb255651b82e2eeccd7ebbf4ca31fab86135e2] | committer: Jean-Baptiste Kempf

Qt: move playMRL slot from THEDP to RecentsMRL

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04cb255651b82e2eeccd7ebbf4ca31fab86135e2
---

 modules/gui/qt4/dialogs_provider.cpp |    9 ---------
 modules/gui/qt4/dialogs_provider.hpp |    2 --
 modules/gui/qt4/recents.cpp          |    7 ++++++-
 modules/gui/qt4/recents.hpp          |    2 ++
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 93de743..cb38f3e 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -813,12 +813,3 @@ void DialogsProvider::SDMenuAction( const QString& data )
         playlist_ServicesDiscoveryRemove( THEPL, qtu( data ) );
 }
 
-/**
- * Play the MRL contained in the Recently played menu.
- **/
-void DialogsProvider::playMRL( const QString &mrl )
-{
-    playlist_Add( THEPL, qtu(mrl), NULL,
-                  PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, pl_Unlocked );
-    RecentsMRL::getInstance( p_intf )->addRecent( mrl );
-}
diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp
index ecb9f7b..e8d3d16 100644
--- a/modules/gui/qt4/dialogs_provider.hpp
+++ b/modules/gui/qt4/dialogs_provider.hpp
@@ -110,8 +110,6 @@ private:
     void saveAPlaylist(playlist_t *p_playlist, playlist_item_t *p_node);
 
 public slots:
-    void playMRL( const QString & );
-
     void playlistDialog();
     void bookmarksDialog();
     void mediaInfoDialog();
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index 7348602..0a0fd13 100755
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -55,7 +55,7 @@ RecentsMRL::RecentsMRL( intf_thread_t *_p_intf ) : p_intf( _p_intf )
     signalMapper = new QSignalMapper( this );
     CONNECT( signalMapper,
             mapped(const QString & ),
-            DialogsProvider::getInstance( p_intf ),
+            this,
             playMRL( const QString & ) );
 
     /* Load the filter psz */
@@ -163,6 +163,11 @@ playlist_item_t *RecentsMRL::toPlaylist(int length)
     return p_node_recent;
 }
 
+void RecentsMRL::playMRL( const QString &mrl )
+{
+    Open::openMRL( p_intf, mrl );
+}
+
 void Open::openMRL( intf_thread_t *p_intf,
                     const QString &mrl,
                     bool b_start,
diff --git a/modules/gui/qt4/recents.hpp b/modules/gui/qt4/recents.hpp
index ad55562..ce6cfdd 100644
--- a/modules/gui/qt4/recents.hpp
+++ b/modules/gui/qt4/recents.hpp
@@ -66,8 +66,10 @@ private:
 
     void load();
     void save();
+
 public slots:
     void clear();
+    void playMRL( const QString & );
 };
 
 #endif



More information about the vlc-commits mailing list