1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Move query to the top of the pipeline if a secondary, prioritized resolve requests arrives.

This commit is contained in:
Christian Muehlhaeuser
2012-06-03 21:22:56 +02:00
parent 2425ec34e5
commit 2fefdf8118

View File

@@ -205,10 +205,16 @@ Pipeline::resolve( const QList<query_ptr>& qlist, bool prioritized, bool tempora
{
if ( q->resolvingFinished() )
continue;
if ( m_queries_pending.contains( q ) )
continue;
if ( m_qidsState.contains( q->id() ) )
continue;
if ( m_queries_pending.contains( q ) )
{
if ( prioritized )
{
m_queries_pending.insert( i++, m_queries_pending.takeAt( m_queries_pending.indexOf( q ) ) );
}
continue;
}
if ( !m_qids.contains( q->id() ) )
m_qids.insert( q->id(), q );