mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Update resultModel less often in Search
This commit is contained in:
@@ -202,6 +202,8 @@ SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
|||||||
{
|
{
|
||||||
QList<Tomahawk::artist_ptr> artists;
|
QList<Tomahawk::artist_ptr> artists;
|
||||||
QList<Tomahawk::album_ptr> albums;
|
QList<Tomahawk::album_ptr> albums;
|
||||||
|
QList<Tomahawk::query_ptr> queries;
|
||||||
|
|
||||||
foreach( const Tomahawk::result_ptr& result, results )
|
foreach( const Tomahawk::result_ptr& result, results )
|
||||||
{
|
{
|
||||||
if ( !result->collection().isNull() && !result->isOnline() )
|
if ( !result->collection().isNull() && !result->isOnline() )
|
||||||
@@ -213,12 +215,12 @@ SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
|
|||||||
Tomahawk::query_ptr q = result->toQuery();
|
Tomahawk::query_ptr q = result->toQuery();
|
||||||
q->addResults( rl );
|
q->addResults( rl );
|
||||||
|
|
||||||
m_resultsModel->appendQuery( q );
|
queries << q;
|
||||||
|
|
||||||
artists << result->track()->artistPtr();
|
artists << result->track()->artistPtr();
|
||||||
albums << result->track()->albumPtr();
|
albums << result->track()->albumPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_resultsModel->appendQueries( queries );
|
||||||
onArtistsFound( artists );
|
onArtistsFound( artists );
|
||||||
onAlbumsFound( albums );
|
onAlbumsFound( albums );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user