diff --git a/src/libtomahawk/Pipeline.cpp b/src/libtomahawk/Pipeline.cpp index abfd179c7..e4ed7f28f 100644 --- a/src/libtomahawk/Pipeline.cpp +++ b/src/libtomahawk/Pipeline.cpp @@ -430,7 +430,7 @@ Pipeline::onResultUrlCheckerDone( ) return; }*/ - decQIDState( q, reinterpret_cast( checker->resolver() ) ); + decQIDState( q, reinterpret_cast( checker->userData() ) ); } @@ -567,12 +567,13 @@ Pipeline::shunt( const query_ptr& q ) auto timeout = r->timeout(); if ( timeout == 0 ) timeout = DEFAULT_RESOLVER_TIMEOUT; - new FuncTimeout( r->timeout(), std::bind( &Pipeline::timeoutShunt, this, q, r ), this ); + + new FuncTimeout( timeout, std::bind( &Pipeline::timeoutShunt, this, q, r ), this ); } else { // we get here if we disable a resolver while a query is resolving - decQIDState(q, r); + // OR we are just out of resolvers while query is still resolving return; } diff --git a/src/libtomahawk/utils/ResultUrlChecker.cpp b/src/libtomahawk/utils/ResultUrlChecker.cpp index 0b605bef5..c57332f9b 100644 --- a/src/libtomahawk/utils/ResultUrlChecker.cpp +++ b/src/libtomahawk/utils/ResultUrlChecker.cpp @@ -32,11 +32,11 @@ using namespace Tomahawk; -ResultUrlChecker::ResultUrlChecker( const query_ptr& query, void* r, +ResultUrlChecker::ResultUrlChecker( const query_ptr& query, QObject* userData, const QList< result_ptr >& results ) : QObject( 0 ) , m_query( query ) - , m_resolver( r ) + , m_userData( userData ) , m_results( results ) { check(); diff --git a/src/libtomahawk/utils/ResultUrlChecker.h b/src/libtomahawk/utils/ResultUrlChecker.h index 64fee1770..3a90bc82f 100644 --- a/src/libtomahawk/utils/ResultUrlChecker.h +++ b/src/libtomahawk/utils/ResultUrlChecker.h @@ -33,11 +33,11 @@ class ResultUrlChecker : public QObject { Q_OBJECT public: - ResultUrlChecker( const query_ptr& query, void* r, const QList< result_ptr >& results ); + ResultUrlChecker( const query_ptr& query, QObject* userData, const QList< result_ptr >& results ); virtual ~ResultUrlChecker(); query_ptr query() const { return m_query; } - void* resolver() const { return m_resolver; } + void* userData() const { return m_userData; } QList< result_ptr > results() const { return m_results; } QList< result_ptr > validResults() const { return m_validResults; } @@ -50,7 +50,7 @@ private slots: private: query_ptr m_query; - void* m_resolver; + QObject* m_userData; QList< result_ptr > m_results; QList< result_ptr > m_validResults; QHash< NetworkReply*, Tomahawk::result_ptr > m_replies;