diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index 5752886ab..842b9c800 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -108,6 +108,7 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel ) disconnect( m_model, SIGNAL( loadingFinished() ), this, SIGNAL( loadingFinished() ) ); disconnect( m_model, SIGNAL( itemCountChanged( unsigned int ) ), this, SIGNAL( itemCountChanged( unsigned int ) ) ); disconnect( m_model, SIGNAL( indexPlayable( QModelIndex ) ), this, SLOT( onIndexPlayable( QModelIndex ) ) ); + disconnect( m_model, SIGNAL( currentIndexChanged() ), this, SIGNAL( currentIndexChanged() ) ); } m_model = sourceModel; @@ -118,6 +119,7 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel ) connect( m_model, SIGNAL( loadingFinished() ), SIGNAL( loadingFinished() ) ); connect( m_model, SIGNAL( itemCountChanged( unsigned int ) ), SIGNAL( itemCountChanged( unsigned int ) ) ); connect( m_model, SIGNAL( indexPlayable( QModelIndex ) ), SLOT( onIndexPlayable( QModelIndex ) ) ); + connect( m_model, SIGNAL( currentIndexChanged() ), SIGNAL( currentIndexChanged() ) ); } QSortFilterProxyModel::setSourceModel( m_model ); @@ -632,8 +634,7 @@ void PlayableProxyModel::setCurrentIndex( const QModelIndex& index ) { tDebug() << Q_FUNC_INFO; - m_model->setCurrentItem( mapToSource( index ) ); - emit currentIndexChanged(); + m_model->setCurrentIndex( mapToSource( index ) ); } diff --git a/src/libtomahawk/playlist/PlaylistModel.cpp b/src/libtomahawk/playlist/PlaylistModel.cpp index f470aa157..393e5fd14 100644 --- a/src/libtomahawk/playlist/PlaylistModel.cpp +++ b/src/libtomahawk/playlist/PlaylistModel.cpp @@ -270,7 +270,7 @@ PlaylistModel::insertEntries( const QList< Tomahawk::plentry_ptr >& entries, int i++; if ( entry->query()->id() == currentItemUuid() ) - setCurrentItem( plitem->index ); + setCurrentIndex( plitem->index ); if ( !entry->query()->resolvingFinished() && !entry->query()->playable() ) {