Commit 0c8124fd authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: change metaChanged signal from id to input_item_t*

parent 685788f5
...@@ -94,8 +94,8 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ ...@@ -94,8 +94,8 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
#undef ADD_ICON #undef ADD_ICON
rebuild( p_root ); rebuild( p_root );
CONNECT( THEMIM->getIM(), metaChanged( int ), CONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
this, ProcessInputItemUpdate( int ) ); this, ProcessInputItemUpdate( input_item_t *) );
CONNECT( THEMIM, inputChanged( input_thread_t * ), CONNECT( THEMIM, inputChanged( input_thread_t * ),
this, ProcessInputItemUpdate( input_thread_t* ) ); this, ProcessInputItemUpdate( input_thread_t* ) );
} }
...@@ -572,17 +572,17 @@ void PLModel::customEvent( QEvent *event ) ...@@ -572,17 +572,17 @@ void PLModel::customEvent( QEvent *event )
void PLModel::ProcessInputItemUpdate( input_thread_t *p_input ) void PLModel::ProcessInputItemUpdate( input_thread_t *p_input )
{ {
if( !p_input ) return; 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 ) ) ) if( p_input && !( p_input->b_dead || !vlc_object_alive( p_input ) ) )
{ {
PLItem *item = FindByInput( rootItem, input_GetItem( p_input )->i_id ); PLItem *item = FindByInput( rootItem, input_GetItem( p_input )->i_id );
emit currentChanged( index( item, 0 ) ); 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; if( !p_item || p_item->i_id <= 0 ) return;
PLItem *item = FindByInput( rootItem, i_input_id ); PLItem *item = FindByInput( rootItem, p_item->i_id );
if( item ) if( item )
{ {
QPL_LOCK; QPL_LOCK;
......
...@@ -186,7 +186,7 @@ private slots: ...@@ -186,7 +186,7 @@ private slots:
void popupSave(); void popupSave();
void popupExplore(); void popupExplore();
void viewchanged( int ); void viewchanged( int );
void ProcessInputItemUpdate( int i_input_id ); void ProcessInputItemUpdate( input_item_t *);
void ProcessInputItemUpdate( input_thread_t* p_input ); void ProcessInputItemUpdate( input_thread_t* p_input );
}; };
......
...@@ -151,7 +151,7 @@ void InputManager::customEvent( QEvent *event ) ...@@ -151,7 +151,7 @@ void InputManager::customEvent( QEvent *event )
IMEvent *ple = static_cast<IMEvent *>(event); IMEvent *ple = static_cast<IMEvent *>(event);
if( i_type == ItemChanged_Type ) if( i_type == ItemChanged_Type )
UpdateMeta( ple->p_item->i_id ); UpdateMeta( ple->p_item );
if( !hasInput() ) if( !hasInput() )
return; return;
...@@ -616,9 +616,9 @@ inline void InputManager::UpdateStats() ...@@ -616,9 +616,9 @@ inline void InputManager::UpdateStats()
emit statisticsUpdated( input_GetItem( p_input ) ); 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() inline void InputManager::UpdateMeta()
......
...@@ -137,7 +137,7 @@ private: ...@@ -137,7 +137,7 @@ private:
void UpdateArt(); void UpdateArt();
void UpdateInfo(); void UpdateInfo();
void UpdateMeta(); void UpdateMeta();
void UpdateMeta(int); void UpdateMeta(input_item_t *);
void UpdateVout(); void UpdateVout();
void UpdateAout(); void UpdateAout();
void UpdateStats(); void UpdateStats();
...@@ -186,7 +186,7 @@ signals: ...@@ -186,7 +186,7 @@ signals:
void statisticsUpdated( input_item_t* ); void statisticsUpdated( input_item_t* );
void infoChanged( input_item_t* ); void infoChanged( input_item_t* );
void currentMetaChanged( input_item_t* ); void currentMetaChanged( input_item_t* );
void metaChanged( int ); void metaChanged( input_item_t *);
void artChanged( QString ); void artChanged( QString );
/// Play/pause status /// Play/pause status
void statusChanged( int ); void statusChanged( int );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment