1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +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;
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:
m_registered = true;
setupDbSyncConnection();
m_servent->registerControlConnection( this );
setupDbSyncConnection();
}
void
ControlConnection::setupDbSyncConnection( bool ondemand )
{
if( m_dbsyncconn != NULL || !m_registered )
if ( m_dbsyncconn || !m_registered )
return;
qDebug() << Q_FUNC_INFO << ondemand << m_source->id();
@ -159,7 +160,7 @@ ControlConnection::dbSyncConnFinished( QObject* c )
DBSyncConnection*
ControlConnection::dbSyncConnection()
{
qDebug() << Q_FUNC_INFO;
qDebug() << Q_FUNC_INFO << m_source->id();
if ( !m_dbsyncconn )
{
setupDbSyncConnection( true );

View File

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

View File

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