mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Drop existing results when re-resolving a Query.
This commit is contained in:
@@ -241,6 +241,8 @@ void
|
||||
Query::refreshResults()
|
||||
{
|
||||
Q_D( Query );
|
||||
|
||||
clearResults();
|
||||
if ( d->resolveFinished && d->allowReresolve )
|
||||
{
|
||||
d->resolveFinished = false;
|
||||
@@ -287,6 +289,21 @@ Query::removeResult( const Tomahawk::result_ptr& result )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::clearResults()
|
||||
{
|
||||
Q_D( Query );
|
||||
{
|
||||
QMutexLocker lock( &d->mutex );
|
||||
d->results.clear();
|
||||
}
|
||||
|
||||
d->solved = false;
|
||||
d->playable = false;
|
||||
emit resultsChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::onResolvingFinished()
|
||||
{
|
||||
@@ -478,16 +495,6 @@ Query::disallowReresolve()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::clearResults()
|
||||
{
|
||||
foreach( const result_ptr& rp, results() )
|
||||
{
|
||||
removeResult( rp );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Query::checkResults()
|
||||
{
|
||||
|
Reference in New Issue
Block a user