mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Use PlayableModel's new currentIndex methods.
This commit is contained in:
parent
96b9f38b2e
commit
93951bfdd4
@ -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 ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -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() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user