1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-20 21:02:26 +02:00

Be able to force set online status

This commit is contained in:
Uwe L. Korn
2014-09-17 18:49:49 +01:00
parent 2f44f64692
commit d0b2d39967
3 changed files with 4 additions and 4 deletions

View File

@@ -459,12 +459,12 @@ Source::setOffline()
void void
Source::setOnline() Source::setOnline( bool force )
{ {
Q_D( Source ); Q_D( Source );
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << friendlyName(); tDebug( LOGVERBOSE ) << Q_FUNC_INFO << friendlyName();
if ( d->online ) if ( d->online && !force )
return; return;
d->online = true; d->online = true;

View File

@@ -140,7 +140,7 @@ private slots:
void handleDisconnect( Tomahawk::Accounts::Account*, Tomahawk::Accounts::AccountManager::DisconnectReason reason ); void handleDisconnect( Tomahawk::Accounts::Account*, Tomahawk::Accounts::AccountManager::DisconnectReason reason );
void setOffline(); void setOffline();
void setOnline(); void setOnline( bool force = false );
void onStateChanged( Tomahawk::DBSyncConnectionState newstate, Tomahawk::DBSyncConnectionState oldstate, const QString& info ); void onStateChanged( Tomahawk::DBSyncConnectionState newstate, Tomahawk::DBSyncConnectionState oldstate, const QString& info );

View File

@@ -135,7 +135,7 @@ ControlConnection::setup()
connect( d->source.data(), SIGNAL( syncedWithDatabase() ), connect( d->source.data(), SIGNAL( syncedWithDatabase() ),
SLOT( registerSource() ), Qt::QueuedConnection ); SLOT( registerSource() ), Qt::QueuedConnection );
d->source->setOnline(); d->source->setOnline( true );
d->pingtimer = new QTimer; d->pingtimer = new QTimer;
d->pingtimer->setInterval( 5000 ); d->pingtimer->setInterval( 5000 );