1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 08:19:42 +01:00

fix playlist rename hookups

This commit is contained in:
Leo Franchi 2011-05-19 22:19:16 -04:00
parent cd0cb9efab
commit cd29484d52
3 changed files with 4 additions and 1 deletions

View File

@ -74,6 +74,7 @@ PlaylistModel::loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEn
{
disconnect( m_playlist.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ), this, SLOT( onRevisionLoaded( Tomahawk::PlaylistRevision ) ) );
disconnect( m_playlist.data(), SIGNAL( deleted( Tomahawk::playlist_ptr ) ), this, SIGNAL( playlistDeleted() ) );
disconnect( m_playlist.data(), SIGNAL( changed() ), this, SIGNAL( playlistChanged() ) );
}
if ( rowCount( QModelIndex() ) && loadEntries )
@ -84,6 +85,7 @@ PlaylistModel::loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEn
m_playlist = playlist;
connect( playlist.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ), SLOT( onRevisionLoaded( Tomahawk::PlaylistRevision ) ) );
connect( playlist.data(), SIGNAL( deleted( Tomahawk::playlist_ptr ) ), this, SIGNAL( playlistDeleted() ) );
connect( playlist.data(), SIGNAL( changed() ), this, SIGNAL( playlistChanged() ) );
setReadOnly( !m_playlist->author()->isLocal() );
setTitle( playlist->title() );

View File

@ -73,6 +73,7 @@ signals:
void itemSizeChanged( const QModelIndex& index );
void playlistDeleted();
void playlistChanged();
private slots:
void onDataChanged();

View File

@ -74,7 +74,7 @@ PlaylistView::setPlaylistModel( PlaylistModel* model )
connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
connect( m_model, SIGNAL( playlistDeleted() ), SLOT( onDeleted() ) );
connect( m_model->playlist().data(), SIGNAL( changed() ), SLOT( onChanged() ) );
connect( m_model, SIGNAL( playlistChanged() ), SLOT( onChanged() ) );
}