mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-19 15:45:48 +01:00
Add an isResolving() function to Pipeline
This commit is contained in:
parent
1719a17325
commit
759ad2cfa4
src/libtomahawk
@ -240,6 +240,13 @@ Pipeline::resolve( const QList<query_ptr>& qlist, bool prioritized, bool tempora
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Pipeline::isResolving( const query_ptr& q ) const
|
||||
{
|
||||
return m_qids.contains( q->id() ) && m_qidsState.contains( q->id() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Pipeline::resolve( const query_ptr& q, bool prioritized, bool temporaryQuery )
|
||||
{
|
||||
@ -275,13 +282,13 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
||||
Q_ASSERT( !q.isNull() );
|
||||
if ( q.isNull() )
|
||||
return;
|
||||
|
||||
|
||||
QList< result_ptr > cleanResults;
|
||||
foreach ( const result_ptr& r, results )
|
||||
{
|
||||
if ( r.isNull() )
|
||||
continue;
|
||||
|
||||
|
||||
float score = q->howSimilar( r );
|
||||
r->setScore( score );
|
||||
if ( !q->isFullTextQuery() && score < MINSCORE )
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
return m_rids.value( rid );
|
||||
}
|
||||
|
||||
bool isResolving( const query_ptr& q ) const;
|
||||
|
||||
public slots:
|
||||
void resolve( const query_ptr& q, bool prioritized = true, bool temporaryQuery = false );
|
||||
void resolve( const QList<query_ptr>& qlist, bool prioritized = true, bool temporaryQuery = false );
|
||||
|
Loading…
x
Reference in New Issue
Block a user