From 6b36f3a737fb704a72c7b2a2fb06738dd55d1ce3 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 8 Jun 2013 10:19:35 +0200 Subject: [PATCH] * PlayableModel::ensureResolved() passes queries in one batch to the Pipeline now. --- src/libtomahawk/playlist/PlayableModel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/PlayableModel.cpp b/src/libtomahawk/playlist/PlayableModel.cpp index 391b8c164..a1365e49b 100644 --- a/src/libtomahawk/playlist/PlayableModel.cpp +++ b/src/libtomahawk/playlist/PlayableModel.cpp @@ -746,13 +746,16 @@ PlayableModel::onPlaybackStopped() void PlayableModel::ensureResolved() { - for( int i = 0; i < rowCount( QModelIndex() ); i++ ) + QList< query_ptr > ql; + for ( int i = 0; i < rowCount( QModelIndex() ); i++ ) { query_ptr query = itemFromIndex( index( i, 0, QModelIndex() ) )->query(); if ( !query->resolvingFinished() ) - Pipeline::instance()->resolve( query ); + ql << query; } + + Pipeline::instance()->resolve( ql ); }