[vlc-devel] commit: Qt: no need to go through the MainInterface to forward the signals about recentItems . (Jean-Baptiste Kempf )

git version control git at videolan.org
Tue Dec 30 13:21:10 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Dec 29 21:35:46 2008 +0100| [610eb0373a33bf0de40bbf14c2835c0a0dc27311] | committer: Jean-Baptiste Kempf 

Qt: no need to go through the MainInterface to forward the signals about recentItems.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/main_interface.cpp |   12 ------------
 modules/gui/qt4/main_interface.hpp |    1 -
 modules/gui/qt4/recents.cpp        |    5 +++--
 modules/gui/qt4/recents.hpp        |    3 ---
 4 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 8ec4dae..6fc8e24 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -137,10 +137,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* StatusBar Creation */
     createStatusBar();
 
-    /* Recents menu updates */
-    CONNECT( RecentsMRL::getInstance( p_intf ), updated(),
-             this, updateRecentsMenu() );
-
     /********************
      * Input Manager    *
      ********************/
@@ -1140,11 +1136,3 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
      return VLC_SUCCESS;
 }
 
-/*****************************************************************************
- * updateRecentsMenu: event called by RecentsMRL
- *****************************************************************************/
-
-void MainInterface::updateRecentsMenu()
-{
-    QVLCMenu::updateRecents( p_intf );
-}
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 748d33c..a532d91 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -169,7 +169,6 @@ private slots:
     void handleSystrayClick( QSystemTrayIcon::ActivationReason );
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
-    void updateRecentsMenu();
 signals:
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index ea3fcd4..4fbae09 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -24,6 +24,7 @@
 
 #include "recents.hpp"
 #include "dialogs_provider.hpp"
+#include "menus.hpp"
 
 #include <QList>
 #include <QString>
@@ -76,7 +77,7 @@ void RecentsMRL::addRecent( const QString &mrl )
         if( stack->size() > RECENTS_LIST_SIZE )
             stack->takeLast();
     }
-    emit updated();
+    QVLCMenu::updateRecents( p_intf );
     save();
 }
 
@@ -85,7 +86,7 @@ void RecentsMRL::clear()
     if ( stack->isEmpty() )
         return;
     stack->clear();
-    emit updated();
+    QVLCMenu::updateRecents( p_intf );
     save();
 }
 
diff --git a/modules/gui/qt4/recents.hpp b/modules/gui/qt4/recents.hpp
index c45c799..3a394f6 100644
--- a/modules/gui/qt4/recents.hpp
+++ b/modules/gui/qt4/recents.hpp
@@ -38,9 +38,6 @@ class RecentsMRL : public QObject
 {
     Q_OBJECT
 
-signals:
-    void updated();
-
 public:
     static RecentsMRL* getInstance( intf_thread_t* p_intf )
     {




More information about the vlc-devel mailing list