1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02: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( Database::instance(), SIGNAL( indexReady() ), SLOT( refreshResults() ), Qt::QueuedConnection );
} }
connect( Pipeline::instance(), SIGNAL( resolverAdded( Resolver* ) ), connect( Pipeline::instance(), SIGNAL( resolverAdded( Tomahawk::Resolver* ) ), SLOT( onResolverAdded() ), Qt::QueuedConnection );
SLOT( onResolverAdded() ), Qt::QueuedConnection );
connect( Pipeline::instance(), SIGNAL( resolverRemoved( Resolver* ) ),
SLOT( onResolverRemoved() ), Qt::QueuedConnection );
} }
@@ -216,7 +213,6 @@ Query::addResults( const QList< Tomahawk::result_ptr >& newresults )
m_results << newresults; m_results << newresults;
qStableSort( m_results.begin(), m_results.end(), Query::resultSorter ); qStableSort( m_results.begin(), m_results.end(), Query::resultSorter );
query_ptr q = m_ownRef.toStrongRef();
// hook up signals, and check solved status // hook up signals, and check solved status
foreach( const result_ptr& rp, newresults ) foreach( const result_ptr& rp, newresults )
@@ -318,16 +314,6 @@ Query::onResolverAdded()
} }
void
Query::onResolverRemoved()
{
if ( !solved() )
{
refreshResults();
}
}
QList< result_ptr > QList< result_ptr >
Query::results() const Query::results() const
{ {
@@ -447,7 +433,7 @@ Query::checkResults()
} }
} }
if ( m_playable && !playable ) if ( m_solved && !solved )
{ {
refreshResults(); refreshResults();
} }

View File

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