From 07660c3f8179a186a9c8b69fb147a8c2ba87112b Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 7 Jun 2012 10:42:40 +0200 Subject: [PATCH] * Refresh results when the solve status changed. --- src/libtomahawk/Query.cpp | 18 ++---------------- src/libtomahawk/Query.h | 3 --- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index 246664450..4d803f776 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -125,10 +125,7 @@ Query::Query( const QString& artist, const QString& track, const QString& album, connect( Database::instance(), SIGNAL( indexReady() ), SLOT( refreshResults() ), Qt::QueuedConnection ); } - connect( Pipeline::instance(), SIGNAL( resolverAdded( Resolver* ) ), - SLOT( onResolverAdded() ), Qt::QueuedConnection ); - connect( Pipeline::instance(), SIGNAL( resolverRemoved( Resolver* ) ), - SLOT( onResolverRemoved() ), Qt::QueuedConnection ); + connect( Pipeline::instance(), SIGNAL( resolverAdded( Tomahawk::Resolver* ) ), SLOT( onResolverAdded() ), Qt::QueuedConnection ); } @@ -216,7 +213,6 @@ Query::addResults( const QList< Tomahawk::result_ptr >& newresults ) m_results << newresults; qStableSort( m_results.begin(), m_results.end(), Query::resultSorter ); - query_ptr q = m_ownRef.toStrongRef(); // hook up signals, and check solved status foreach( const result_ptr& rp, newresults ) @@ -318,16 +314,6 @@ Query::onResolverAdded() } -void -Query::onResolverRemoved() -{ - if ( !solved() ) - { - refreshResults(); - } -} - - QList< result_ptr > Query::results() const { @@ -447,7 +433,7 @@ Query::checkResults() } } - if ( m_playable && !playable ) + if ( m_solved && !solved ) { refreshResults(); } diff --git a/src/libtomahawk/Query.h b/src/libtomahawk/Query.h index 20e9956d7..6eb60088c 100644 --- a/src/libtomahawk/Query.h +++ b/src/libtomahawk/Query.h @@ -199,10 +199,7 @@ public slots: void addArtists( const QList< Tomahawk::artist_ptr >& ); void onResolvingFinished(); - - // resolve if not solved() void onResolverAdded(); - void onResolverRemoved(); private slots: void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );