mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 17:42:35 +02:00
* Some cleanups.
This commit is contained in:
parent
12d8a892de
commit
eadfd92929
@ -44,9 +44,10 @@ Artist::Artist( unsigned int id, const QString& name, const Tomahawk::collection
|
||||
Tomahawk::collection_ptr
|
||||
Artist::collection() const
|
||||
{
|
||||
return m_collection;
|
||||
return m_collection;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Artist::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const Tomahawk::collection_ptr& collection )
|
||||
{
|
||||
|
@ -23,11 +23,11 @@ public:
|
||||
|
||||
Artist();
|
||||
virtual ~Artist();
|
||||
|
||||
|
||||
unsigned int id() const { return m_id; }
|
||||
QString name() const { return m_name; }
|
||||
|
||||
Tomahawk::collection_ptr collection() const;
|
||||
Tomahawk::collection_ptr collection() const;
|
||||
|
||||
virtual QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
|
@ -19,7 +19,7 @@ SourceList::instance()
|
||||
{
|
||||
s_instance = new SourceList();
|
||||
}
|
||||
|
||||
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
@ -43,10 +43,10 @@ SourceList::loadSources()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
DatabaseCommand_LoadAllSources* cmd = new DatabaseCommand_LoadAllSources();
|
||||
|
||||
connect( cmd, SIGNAL( done( const QList<Tomahawk::source_ptr>& ) ),
|
||||
SLOT( setSources( const QList<Tomahawk::source_ptr>& ) ) );
|
||||
|
||||
|
||||
connect( cmd, SIGNAL( done( QList<Tomahawk::source_ptr> ) ),
|
||||
SLOT( setSources( QList<Tomahawk::source_ptr> ) ) );
|
||||
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ SourceList::setLocal( const Tomahawk::source_ptr& localSrc )
|
||||
{
|
||||
Q_ASSERT( localSrc->isLocal() );
|
||||
Q_ASSERT( m_local.isNull() );
|
||||
|
||||
|
||||
{
|
||||
QMutexLocker lock( &m_mut );
|
||||
m_sources.insert( localSrc->userName(), localSrc );
|
||||
@ -92,11 +92,11 @@ SourceList::add( const source_ptr& source )
|
||||
if ( source->id() > 0 )
|
||||
m_sources_id2name.insert( source->id(), source->userName() );
|
||||
connect( source.data(), SIGNAL( syncedWithDatabase() ), SLOT( sourceSynced() ) );
|
||||
|
||||
|
||||
collection_ptr coll( new RemoteCollection( source ) );
|
||||
source->addCollection( coll );
|
||||
source->collection()->tracks();
|
||||
|
||||
// source->collection()->tracks();
|
||||
|
||||
emit sourceAdded( source );
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ TomahawkApp::removeScriptResolver( const QString& path )
|
||||
foreach( ScriptResolver* r, m_scriptResolvers ) {
|
||||
if( r->exe() == path ) {
|
||||
m_scriptResolvers.removeAll( r );
|
||||
|
||||
|
||||
delete r;
|
||||
return;
|
||||
}
|
||||
@ -422,7 +422,7 @@ TomahawkApp::initLocalCollection()
|
||||
|
||||
src->addCollection( coll );
|
||||
SourceList::instance()->setLocal( src );
|
||||
src->collection()->tracks();
|
||||
// src->collection()->tracks();
|
||||
|
||||
// to make the stats signal be emitted by our local source
|
||||
// this will update the sidebar, etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user