mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
Fix updating the DiagnosticsDialog when new peers are set online
This commit is contained in:
@@ -109,7 +109,7 @@ DiagnosticsDialog::updateLogView()
|
|||||||
|
|
||||||
connect( account, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
connect( account, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||||
connect( account, SIGNAL( error( int, QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
connect( account, SIGNAL( error( int, QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||||
connect( account->sipPlugin(), SIGNAL( peerOnline( Tomahawk::peerinfo_ptr ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
connect( account->sipPlugin(), SIGNAL( peerStatusChanged( Tomahawk::peerinfo_ptr ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||||
|
|
||||||
log.append( accountLog( account ) + "\n" );
|
log.append( accountLog( account ) + "\n" );
|
||||||
}
|
}
|
||||||
|
@@ -177,6 +177,12 @@ PeerInfo::setStatus( PeerInfo::Status status )
|
|||||||
|
|
||||||
if( status == Online )
|
if( status == Online )
|
||||||
announce();
|
announce();
|
||||||
|
|
||||||
|
// we need this to update the DiagnosticsDialog on new peers
|
||||||
|
// if we ever happen to have a central PeerInfo manager object
|
||||||
|
// we better add it there, but so far this would be the only
|
||||||
|
// usage
|
||||||
|
sipPlugin()->peerStatusChanged( weakRef().toStrongRef() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -41,6 +41,8 @@ class DLLEXPORT SipPlugin : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
friend Tomahawk::PeerInfo;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SipPlugin();
|
SipPlugin();
|
||||||
explicit SipPlugin( Tomahawk::Accounts::Account *account, QObject* parent = 0 );
|
explicit SipPlugin( Tomahawk::Accounts::Account *account, QObject* parent = 0 );
|
||||||
@@ -71,7 +73,7 @@ public slots:
|
|||||||
virtual void sendSipInfo( const Tomahawk::peerinfo_ptr& receiver, const SipInfo& info ) = 0;
|
virtual void sendSipInfo( const Tomahawk::peerinfo_ptr& receiver, const SipInfo& info ) = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void peerOnline( const Tomahawk::peerinfo_ptr& );
|
void peerStatusChanged( const Tomahawk::peerinfo_ptr& );
|
||||||
void dataError( bool );
|
void dataError( bool );
|
||||||
|
|
||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
|
Reference in New Issue
Block a user