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:
@@ -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;
|
||||||
|
@@ -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 );
|
||||||
|
|
||||||
|
@@ -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 );
|
||||||
|
Reference in New Issue
Block a user