[vlc-devel] commit: Qt4: change metaChanged signal from id to input_item_t* ( Ilkka Ollakka )

git version control git at videolan.org
Thu Aug 13 14:48:20 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Aug 13 14:25:52 2009 +0300| [0c8124fdea3551013088b8449cda151854d892fa] | committer: Ilkka Ollakka 

Qt4: change metaChanged signal from id to input_item_t*

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

 .../gui/qt4/components/playlist/playlist_model.cpp |   12 ++++++------
 .../gui/qt4/components/playlist/playlist_model.hpp |    2 +-
 modules/gui/qt4/input_manager.cpp                  |    6 +++---
 modules/gui/qt4/input_manager.hpp                  |    4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 207b0f5..8329279 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -94,8 +94,8 @@ PLModel::PLModel( playlist_t *_p_playlist,  /* THEPL */
 #undef ADD_ICON
 
     rebuild( p_root );
-    CONNECT( THEMIM->getIM(), metaChanged( int ),
-            this, ProcessInputItemUpdate( int ) );
+    CONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
+            this, ProcessInputItemUpdate( input_item_t *) );
     CONNECT( THEMIM, inputChanged( input_thread_t * ),
             this, ProcessInputItemUpdate( input_thread_t* ) );
 }
@@ -572,17 +572,17 @@ void PLModel::customEvent( QEvent *event )
 void PLModel::ProcessInputItemUpdate( input_thread_t *p_input )
 {
     if( !p_input ) return;
-    ProcessInputItemUpdate( input_GetItem( p_input )->i_id );
+    ProcessInputItemUpdate( input_GetItem( p_input ) );
     if( p_input && !( p_input->b_dead || !vlc_object_alive( p_input ) ) )
     {
         PLItem *item = FindByInput( rootItem, input_GetItem( p_input )->i_id );
         emit currentChanged( index( item, 0 ) );
     }
 }
-void PLModel::ProcessInputItemUpdate( int i_input_id )
+void PLModel::ProcessInputItemUpdate( input_item_t *p_item )
 {
-    if( i_input_id <= 0 ) return;
-    PLItem *item = FindByInput( rootItem, i_input_id );
+    if( !p_item ||  p_item->i_id <= 0 ) return;
+    PLItem *item = FindByInput( rootItem, p_item->i_id );
     if( item )
     {
         QPL_LOCK;
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
index d4c2e4e..124e198 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
@@ -186,7 +186,7 @@ private slots:
     void popupSave();
     void popupExplore();
     void viewchanged( int );
-    void ProcessInputItemUpdate( int i_input_id );
+    void ProcessInputItemUpdate( input_item_t *);
     void ProcessInputItemUpdate( input_thread_t* p_input );
 };
 
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 867c07d..6d22df5 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -151,7 +151,7 @@ void InputManager::customEvent( QEvent *event )
     IMEvent *ple = static_cast<IMEvent *>(event);
 
     if( i_type == ItemChanged_Type )
-        UpdateMeta( ple->p_item->i_id );
+        UpdateMeta( ple->p_item );
 
     if( !hasInput() )
         return;
@@ -616,9 +616,9 @@ inline void InputManager::UpdateStats()
     emit statisticsUpdated( input_GetItem( p_input ) );
 }
 
-inline void InputManager::UpdateMeta( int id )
+inline void InputManager::UpdateMeta( input_item_t *p_item )
 {
-    emit metaChanged( id );
+    emit metaChanged( p_item );
 }
 
 inline void InputManager::UpdateMeta()
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 4df6beb..ae219b6 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -137,7 +137,7 @@ private:
     void UpdateArt();
     void UpdateInfo();
     void UpdateMeta();
-    void UpdateMeta(int);
+    void UpdateMeta(input_item_t *);
     void UpdateVout();
     void UpdateAout();
     void UpdateStats();
@@ -186,7 +186,7 @@ signals:
     void statisticsUpdated( input_item_t* );
     void infoChanged( input_item_t* );
     void currentMetaChanged( input_item_t* );
-    void metaChanged( int );
+    void metaChanged( input_item_t *);
     void artChanged( QString );
     /// Play/pause status
     void statusChanged( int );




More information about the vlc-devel mailing list