mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 11:50:37 +02:00
Don't wait for timeouts on resolver errors
This commit is contained in:
@@ -323,6 +323,13 @@ Pipeline::resolve( QID qid, bool prioritized, bool temporaryQuery )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Pipeline::reportError( QID qid, Tomahawk::Resolver* r )
|
||||
{
|
||||
reportResults( qid, r, QList< result_ptr>() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Pipeline::reportResults( QID qid, Tomahawk::Resolver* r, const QList< result_ptr >& results )
|
||||
{
|
||||
|
@@ -54,6 +54,7 @@ public:
|
||||
unsigned int pendingQueryCount() const;
|
||||
unsigned int activeQueryCount() const;
|
||||
|
||||
void reportError( QID qid, Tomahawk::Resolver* r );
|
||||
void reportResults( QID qid, Tomahawk::Resolver* r, const QList< result_ptr >& results );
|
||||
void reportAlbums( QID qid, const QList< album_ptr >& albums );
|
||||
void reportArtists( QID qid, const QList< artist_ptr >& artists );
|
||||
|
@@ -566,9 +566,12 @@ JSResolver::onResolveRequestDone( const QVariantMap& data )
|
||||
Q_D( JSResolver );
|
||||
|
||||
ScriptJob* job = qobject_cast< ScriptJob* >( sender() );
|
||||
|
||||
QID qid = job->property( "qid" ).toString();
|
||||
|
||||
if ( job->error() )
|
||||
{
|
||||
// what do here?!
|
||||
Tomahawk::Pipeline::instance()->reportError( qid, this );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -581,7 +584,7 @@ JSResolver::onResolveRequestDone( const QVariantMap& data )
|
||||
result->setFriendlySource( name() );
|
||||
}
|
||||
|
||||
Tomahawk::Pipeline::instance()->reportResults( job->property( "qid" ).toString(), this, results );
|
||||
Tomahawk::Pipeline::instance()->reportResults( qid, this, results );
|
||||
}
|
||||
|
||||
sender()->deleteLater();
|
||||
|
Reference in New Issue
Block a user