mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
The result is independent from the online state of the Collection
This commit is contained in:
@@ -281,11 +281,14 @@ Result::onOffline()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Result::setCollection( const Tomahawk::collection_ptr& collection )
|
Result::setCollection( const Tomahawk::collection_ptr& collection , bool emitOnlineEvents )
|
||||||
{
|
{
|
||||||
m_collection = collection;
|
m_collection = collection;
|
||||||
connect( m_collection->source().data(), SIGNAL( online() ), SLOT( onOnline() ), Qt::QueuedConnection );
|
if ( emitOnlineEvents )
|
||||||
connect( m_collection->source().data(), SIGNAL( offline() ), SLOT( onOffline() ), Qt::QueuedConnection );
|
{
|
||||||
|
connect( m_collection->source().data(), SIGNAL( online() ), SLOT( onOnline() ), Qt::QueuedConnection );
|
||||||
|
connect( m_collection->source().data(), SIGNAL( offline() ), SLOT( onOffline() ), Qt::QueuedConnection );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -92,7 +92,12 @@ public:
|
|||||||
void setScore( float score );
|
void setScore( float score );
|
||||||
void setFileId( unsigned int id );
|
void setFileId( unsigned int id );
|
||||||
void setRID( RID id ) { m_rid = 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 setFriendlySource( const QString& s );
|
||||||
void setPurchaseUrl( const QString& u );
|
void setPurchaseUrl( const QString& u );
|
||||||
void setLinkUrl( const QString& u );
|
void setLinkUrl( const QString& u );
|
||||||
|
@@ -155,7 +155,7 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi )
|
|||||||
result->setModificationTime( modificationTime );
|
result->setModificationTime( modificationTime );
|
||||||
result->setMimetype( mimetype );
|
result->setMimetype( mimetype );
|
||||||
result->setScore( 1.0 );
|
result->setScore( 1.0 );
|
||||||
result->setCollection( s->dbCollection() );
|
result->setCollection( s->dbCollection(), false );
|
||||||
|
|
||||||
QList<Tomahawk::result_ptr> results;
|
QList<Tomahawk::result_ptr> results;
|
||||||
results << result;
|
results << result;
|
||||||
|
Reference in New Issue
Block a user