mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-28 03:32:27 +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()
|
Query::refreshResults()
|
||||||
{
|
{
|
||||||
Q_D( Query );
|
Q_D( Query );
|
||||||
|
|
||||||
|
clearResults();
|
||||||
if ( d->resolveFinished && d->allowReresolve )
|
if ( d->resolveFinished && d->allowReresolve )
|
||||||
{
|
{
|
||||||
d->resolveFinished = false;
|
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
|
void
|
||||||
Query::onResolvingFinished()
|
Query::onResolvingFinished()
|
||||||
{
|
{
|
||||||
@ -478,16 +495,6 @@ Query::disallowReresolve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
Query::clearResults()
|
|
||||||
{
|
|
||||||
foreach( const result_ptr& rp, results() )
|
|
||||||
{
|
|
||||||
removeResult( rp );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Query::checkResults()
|
Query::checkResults()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user