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:
parent
530a420fb4
commit
07660c3f81
@ -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();
|
||||
}
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user