mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 18:14:50 +02:00
Don't create a ResultUrlChecker if there are no results to be checked.
This commit is contained in:
@@ -354,7 +354,7 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
|||||||
QList< result_ptr > httpResults;
|
QList< result_ptr > httpResults;
|
||||||
foreach ( const result_ptr& r, results )
|
foreach ( const result_ptr& r, results )
|
||||||
{
|
{
|
||||||
if ( r.isNull() )
|
if ( !r )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !r->checked() && ( r->url().startsWith( "http" ) && !r->url().startsWith( "http://localhost" ) ) )
|
if ( !r->checked() && ( r->url().startsWith( "http" ) && !r->url().startsWith( "http://localhost" ) ) )
|
||||||
@@ -363,8 +363,11 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
|||||||
cleanResults << r;
|
cleanResults << r;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ResultUrlChecker* checker = new ResultUrlChecker( q, httpResults );
|
if ( !httpResults.isEmpty() )
|
||||||
connect( checker, SIGNAL( done() ), SLOT( onResultUrlCheckerDone() ) );
|
{
|
||||||
|
const ResultUrlChecker* checker = new ResultUrlChecker( q, httpResults );
|
||||||
|
connect( checker, SIGNAL( done() ), SLOT( onResultUrlCheckerDone() ) );
|
||||||
|
}
|
||||||
|
|
||||||
addResultsToQuery( q, cleanResults );
|
addResultsToQuery( q, cleanResults );
|
||||||
/* if ( q->solved() && !q->isFullTextQuery() )
|
/* if ( q->solved() && !q->isFullTextQuery() )
|
||||||
|
Reference in New Issue
Block a user