mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 21:25:52 +02:00
Be able to force set online status
This commit is contained in:
@@ -459,12 +459,12 @@ Source::setOffline()
|
||||
|
||||
|
||||
void
|
||||
Source::setOnline()
|
||||
Source::setOnline( bool force )
|
||||
{
|
||||
Q_D( Source );
|
||||
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << friendlyName();
|
||||
if ( d->online )
|
||||
if ( d->online && !force )
|
||||
return;
|
||||
|
||||
d->online = true;
|
||||
|
@@ -140,7 +140,7 @@ private slots:
|
||||
|
||||
void handleDisconnect( Tomahawk::Accounts::Account*, Tomahawk::Accounts::AccountManager::DisconnectReason reason );
|
||||
void setOffline();
|
||||
void setOnline();
|
||||
void setOnline( bool force = false );
|
||||
|
||||
void onStateChanged( Tomahawk::DBSyncConnectionState newstate, Tomahawk::DBSyncConnectionState oldstate, const QString& info );
|
||||
|
||||
|
@@ -135,7 +135,7 @@ ControlConnection::setup()
|
||||
connect( d->source.data(), SIGNAL( syncedWithDatabase() ),
|
||||
SLOT( registerSource() ), Qt::QueuedConnection );
|
||||
|
||||
d->source->setOnline();
|
||||
d->source->setOnline( true );
|
||||
|
||||
d->pingtimer = new QTimer;
|
||||
d->pingtimer->setInterval( 5000 );
|
||||
|
Reference in New Issue
Block a user