1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Few more debug output / checks to catch the last remaining showstoppers.

This commit is contained in:
Christian Muehlhaeuser
2011-02-28 09:05:12 +01:00
parent cb06d11b61
commit 2ce7e76d95
3 changed files with 7 additions and 5 deletions

View File

@@ -37,7 +37,8 @@ ControlConnection::~ControlConnection()
delete m_pingtimer; delete m_pingtimer;
m_servent->unregisterControlConnection(this); m_servent->unregisterControlConnection(this);
if( m_dbsyncconn ) m_dbsyncconn->deleteLater(); if( m_dbsyncconn )
m_dbsyncconn->deleteLater();
} }
@@ -96,15 +97,15 @@ ControlConnection::registerSource()
// .. but we'll use the shared pointer we've already made: // .. but we'll use the shared pointer we've already made:
m_registered = true; m_registered = true;
setupDbSyncConnection();
m_servent->registerControlConnection( this ); m_servent->registerControlConnection( this );
setupDbSyncConnection();
} }
void void
ControlConnection::setupDbSyncConnection( bool ondemand ) ControlConnection::setupDbSyncConnection( bool ondemand )
{ {
if( m_dbsyncconn != NULL || !m_registered ) if ( m_dbsyncconn || !m_registered )
return; return;
qDebug() << Q_FUNC_INFO << ondemand << m_source->id(); qDebug() << Q_FUNC_INFO << ondemand << m_source->id();
@@ -159,7 +160,7 @@ ControlConnection::dbSyncConnFinished( QObject* c )
DBSyncConnection* DBSyncConnection*
ControlConnection::dbSyncConnection() ControlConnection::dbSyncConnection()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO << m_source->id();
if ( !m_dbsyncconn ) if ( !m_dbsyncconn )
{ {
setupDbSyncConnection( true ); setupDbSyncConnection( true );

View File

@@ -711,7 +711,7 @@ Servent::triggerDBSync()
if ( src.isNull() || src->isLocal() ) if ( src.isNull() || src->isLocal() )
continue; continue;
if ( src->controlConnection() ) // source online? if ( src->controlConnection() && src->controlConnection()->dbSyncConnection() ) // source online?
src->controlConnection()->dbSyncConnection()->trigger(); src->controlConnection()->dbSyncConnection()->trigger();
} }
} }

View File

@@ -422,6 +422,7 @@ TomahawkApp::initLocalCollection()
src->addCollection( coll ); src->addCollection( coll );
SourceList::instance()->setLocal( src ); SourceList::instance()->setLocal( src );
src->collection()->tracks();
// to make the stats signal be emitted by our local source // to make the stats signal be emitted by our local source
// this will update the sidebar, etc. // this will update the sidebar, etc.