1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Refresh results when the solve status changed.

This commit is contained in:
Christian Muehlhaeuser 2012-06-07 10:42:40 +02:00
parent 530a420fb4
commit 07660c3f81
2 changed files with 2 additions and 19 deletions

View File

@ -125,10 +125,7 @@ Query::Query( const QString& artist, const QString& track, const QString& album,
connect( Database::instance(), SIGNAL( indexReady() ), SLOT( refreshResults() ), Qt::QueuedConnection );
}
connect( Pipeline::instance(), SIGNAL( resolverAdded( Resolver* ) ),
SLOT( onResolverAdded() ), Qt::QueuedConnection );
connect( Pipeline::instance(), SIGNAL( resolverRemoved( Resolver* ) ),
SLOT( onResolverRemoved() ), Qt::QueuedConnection );
connect( Pipeline::instance(), SIGNAL( resolverAdded( Tomahawk::Resolver* ) ), SLOT( onResolverAdded() ), Qt::QueuedConnection );
}
@ -216,7 +213,6 @@ Query::addResults( const QList< Tomahawk::result_ptr >& newresults )
m_results << newresults;
qStableSort( m_results.begin(), m_results.end(), Query::resultSorter );
query_ptr q = m_ownRef.toStrongRef();
// hook up signals, and check solved status
foreach( const result_ptr& rp, newresults )
@ -318,16 +314,6 @@ Query::onResolverAdded()
}
void
Query::onResolverRemoved()
{
if ( !solved() )
{
refreshResults();
}
}
QList< result_ptr >
Query::results() const
{
@ -447,7 +433,7 @@ Query::checkResults()
}
}
if ( m_playable && !playable )
if ( m_solved && !solved )
{
refreshResults();
}

View File

@ -199,10 +199,7 @@ public slots:
void addArtists( const QList< Tomahawk::artist_ptr >& );
void onResolvingFinished();
// resolve if not solved()
void onResolverAdded();
void onResolverRemoved();
private slots:
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );