mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 01:09:42 +01:00
Drop existing results when re-resolving a Query.
This commit is contained in:
parent
2bbe2334d7
commit
552f82a5ca
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user