mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
The result is independent from the online state of the Collection
This commit is contained in:
parent
1839b9a881
commit
e73525f18d
@ -281,11 +281,14 @@ Result::onOffline()
|
||||
|
||||
|
||||
void
|
||||
Result::setCollection( const Tomahawk::collection_ptr& collection )
|
||||
Result::setCollection( const Tomahawk::collection_ptr& collection , bool emitOnlineEvents )
|
||||
{
|
||||
m_collection = collection;
|
||||
connect( m_collection->source().data(), SIGNAL( online() ), SLOT( onOnline() ), Qt::QueuedConnection );
|
||||
connect( m_collection->source().data(), SIGNAL( offline() ), SLOT( onOffline() ), Qt::QueuedConnection );
|
||||
if ( emitOnlineEvents )
|
||||
{
|
||||
connect( m_collection->source().data(), SIGNAL( online() ), SLOT( onOnline() ), Qt::QueuedConnection );
|
||||
connect( m_collection->source().data(), SIGNAL( offline() ), SLOT( onOffline() ), Qt::QueuedConnection );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -92,7 +92,12 @@ public:
|
||||
void setScore( float score );
|
||||
void setFileId( unsigned int id );
|
||||
void setRID( RID id ) { m_rid = id; }
|
||||
void setCollection( const Tomahawk::collection_ptr& collection );
|
||||
/**
|
||||
* Associate the used collection for this result.
|
||||
*
|
||||
* @param emitOnlineEvents disableing this will not emit statusChanged anymore thus the query will not update (use with care!, only when this is the sole result)
|
||||
*/
|
||||
void setCollection( const Tomahawk::collection_ptr& collection, bool emitOnlineEvents = true );
|
||||
void setFriendlySource( const QString& s );
|
||||
void setPurchaseUrl( const QString& u );
|
||||
void setLinkUrl( const QString& u );
|
||||
|
@ -155,7 +155,7 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi )
|
||||
result->setModificationTime( modificationTime );
|
||||
result->setMimetype( mimetype );
|
||||
result->setScore( 1.0 );
|
||||
result->setCollection( s->dbCollection() );
|
||||
result->setCollection( s->dbCollection(), false );
|
||||
|
||||
QList<Tomahawk::result_ptr> results;
|
||||
results << result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user