From 5a9425a93023457e137dbca6d30c1abca6aa6493 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 5 May 2011 22:22:16 +0200 Subject: [PATCH 1/8] Add a basic DiagnosticsDialog without actual functionality --- src/CMakeLists.txt | 3 +++ src/diagnosticsdialog.cpp | 47 +++++++++++++++++++++++++++++++++++++++ src/diagnosticsdialog.h | 44 ++++++++++++++++++++++++++++++++++++ src/diagnosticsdialog.ui | 42 ++++++++++++++++++++++++++++++++++ src/tomahawkwindow.cpp | 9 ++++++++ src/tomahawkwindow.h | 1 + src/tomahawkwindow.ui | 7 ++++++ 7 files changed, 153 insertions(+) create mode 100644 src/diagnosticsdialog.cpp create mode 100644 src/diagnosticsdialog.h create mode 100644 src/diagnosticsdialog.ui diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45cf481d1..47a058c81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,6 +64,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui} tomahawktrayicon.cpp audiocontrols.cpp settingsdialog.cpp + diagnosticsdialog.cpp configdelegatebase.cpp sipconfigdelegate.cpp resolverconfigdelegate.cpp @@ -106,6 +107,7 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui} tomahawktrayicon.h audiocontrols.h settingsdialog.h + diagnosticsdialog.h configdelegatebase.h resolverconfigdelegate.h sipconfigdelegate.h @@ -117,6 +119,7 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui} SET( tomahawkUI ${tomahawkUI} tomahawkwindow.ui settingsdialog.ui + diagnosticsdialog.ui stackedsettingsdialog.ui proxydialog.ui diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp new file mode 100644 index 000000000..f3277f7ac --- /dev/null +++ b/src/diagnosticsdialog.cpp @@ -0,0 +1,47 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2011, Dominik Schmidt + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#include "diagnosticsdialog.h" +#include "ui_diagnosticsdialog.h" + + +#include + +DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) + : QDialog( parent ) + , ui( new Ui::DiagnosticsDialog ) +{ + ui->setupUi( this ); + + connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); + + ui->logView->setReadOnly(true); + + updateLogView(); +} + +void DiagnosticsDialog::updateLogView() +{ + QString log( + "Tomahawk Diagnostics Log\n\n" + ); + + ui->logView->setPlainText(log); +} + + diff --git a/src/diagnosticsdialog.h b/src/diagnosticsdialog.h new file mode 100644 index 000000000..ab64ab23d --- /dev/null +++ b/src/diagnosticsdialog.h @@ -0,0 +1,44 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2011, Dominik Schmidt + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#ifndef DIGANOSTICSDIALOG_H +#define DIAGNOSTICSDIALOG_H + +#include +#include + +namespace Ui +{ + class DiagnosticsDialog; +} + +class DiagnosticsDialog : public QDialog +{ +Q_OBJECT + +public: + explicit DiagnosticsDialog( QWidget* parent = 0 ); + ~DiagnosticsDialog() {}; + +private slots: + void updateLogView(); +private: + Ui::DiagnosticsDialog* ui; +}; + +#endif // DIAGNOSTICSDIALOG_H diff --git a/src/diagnosticsdialog.ui b/src/diagnosticsdialog.ui new file mode 100644 index 000000000..992f96e51 --- /dev/null +++ b/src/diagnosticsdialog.ui @@ -0,0 +1,42 @@ + + + DiagnosticsDialog + + + + 0 + 0 + 621 + 434 + + + + + 0 + 353 + + + + Tomahawk Diagnostics + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + + + + + + + + diff --git a/src/tomahawkwindow.cpp b/src/tomahawkwindow.cpp index 041989bcf..47e5b8394 100644 --- a/src/tomahawkwindow.cpp +++ b/src/tomahawkwindow.cpp @@ -52,6 +52,7 @@ #include "audiocontrols.h" #include "settingsdialog.h" +#include "diagnosticsdialog.h" #include "tomahawksettings.h" #include "sourcelist.h" #include "transferview.h" @@ -261,6 +262,7 @@ TomahawkWindow::setupSignals() // connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) ); + connect( ui->actionDiagnostics, SIGNAL( triggered() ), SLOT( showDiagnosticsDialog() ) ); connect( ui->actionToggleConnect, SIGNAL( triggered() ), APP->sipHandler(), SLOT( toggleConnect() ) ); // connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) ); connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) ); @@ -349,6 +351,13 @@ TomahawkWindow::showSettingsDialog() win.exec(); } +void TomahawkWindow::showDiagnosticsDialog() +{ + qDebug() << Q_FUNC_INFO; + DiagnosticsDialog win; + win.exec(); +} + void TomahawkWindow::updateCollectionManually() diff --git a/src/tomahawkwindow.h b/src/tomahawkwindow.h index f86a5b54d..730ba47ce 100644 --- a/src/tomahawkwindow.h +++ b/src/tomahawkwindow.h @@ -66,6 +66,7 @@ public slots: void createPlaylist(); void loadSpiff(); void showSettingsDialog(); + void showDiagnosticsDialog(); void updateCollectionManually(); void pluginMenuAdded(QMenu*); void pluginMenuRemoved(QMenu*); diff --git a/src/tomahawkwindow.ui b/src/tomahawkwindow.ui index c4fee4d69..ece2c6407 100644 --- a/src/tomahawkwindow.ui +++ b/src/tomahawkwindow.ui @@ -83,6 +83,8 @@ &Help + + @@ -181,6 +183,11 @@ Meta+Ctrl+Z + + + Diagnostics... + + From fcb9eb33e48694f940ccde5a5aea5c3b387446fb Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 00:25:06 +0200 Subject: [PATCH 2/8] Add peersOnline() to SipPlugin --- src/libtomahawk/sip/SipPlugin.cpp | 24 ++++++++++++++++++++++++ src/libtomahawk/sip/SipPlugin.h | 7 +++++++ 2 files changed, 31 insertions(+) diff --git a/src/libtomahawk/sip/SipPlugin.cpp b/src/libtomahawk/sip/SipPlugin.cpp index 57d81588a..7f835a0fe 100644 --- a/src/libtomahawk/sip/SipPlugin.cpp +++ b/src/libtomahawk/sip/SipPlugin.cpp @@ -34,6 +34,8 @@ SipPlugin::SipPlugin( const QString& pluginId, QObject* parent ) { connect( this, SIGNAL( error( int, QString ) ), this, SLOT( onError( int,QString ) ) ); connect( this, SIGNAL( stateChanged( SipPlugin::ConnectionState ) ), this, SLOT( onStateChange( SipPlugin::ConnectionState ) ) ); + connect( this, SIGNAL( peerOnline( QString ) ), this, SLOT( onPeerOnline( QString ) ) ); + connect( this, SIGNAL( peerOffline( QString ) ), this, SLOT( onPeerOffline( QString ) ) ); } QString SipPlugin::pluginId() const @@ -67,6 +69,13 @@ SipPlugin::icon() const return QIcon(); } +const QStringList +SipPlugin::peersOnline() const +{ + return m_peersOnline; +} + + void SipPlugin::setProxy( const QNetworkProxy& proxy ) { @@ -85,3 +94,18 @@ SipPlugin::onStateChange( SipPlugin::ConnectionState state ) m_cachedError.clear(); } +void +SipPlugin::onPeerOnline(const QString& peerId) +{ + if( !m_peersOnline.contains( peerId ) ) + { + m_peersOnline.append( peerId ); + } +} + +void +SipPlugin::onPeerOffline(const QString& peerId) +{ + m_peersOnline.removeAll( peerId ); +} + diff --git a/src/libtomahawk/sip/SipPlugin.h b/src/libtomahawk/sip/SipPlugin.h index 0903d980d..156944e21 100644 --- a/src/libtomahawk/sip/SipPlugin.h +++ b/src/libtomahawk/sip/SipPlugin.h @@ -76,6 +76,9 @@ public: virtual void saveConfig() {} // called when the widget has been edited virtual QIcon icon() const; + // peer infos + virtual const QStringList peersOnline() const; + public slots: virtual bool connectPlugin( bool startup = false ) = 0; virtual void disconnectPlugin() = 0; @@ -108,9 +111,13 @@ private slots: void onError( int, const QString& ); void onStateChange( SipPlugin::ConnectionState state ); + void onPeerOnline( const QString &peerId ); + void onPeerOffline( const QString &peerId ); + private: QString m_pluginId; QString m_cachedError; + QStringList m_peersOnline; }; Q_DECLARE_INTERFACE( SipPluginFactory, "tomahawk.SipFactory/1.0" ) From 8b3e1dc3725b039f84cc39669b250d68e42df30b Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 00:27:23 +0200 Subject: [PATCH 3/8] DiagnosticsDialog: Add SipPlugin log --- src/diagnosticsdialog.cpp | 44 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index f3277f7ac..2927f0ac1 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -19,8 +19,10 @@ #include "diagnosticsdialog.h" #include "ui_diagnosticsdialog.h" +#include -#include +#include +#include DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) : QDialog( parent ) @@ -41,7 +43,43 @@ void DiagnosticsDialog::updateLogView() "Tomahawk Diagnostics Log\n\n" ); + // Peers + log.append("Sip Plugins:\n"); + Q_FOREACH(SipPlugin *sip, SipHandler::instance()->allPlugins()) + { + Q_ASSERT(sip); + QString stateString; + switch( sip->connectionState() ) + { + case SipPlugin::Connecting: + stateString = "Connecting"; + break; + + case SipPlugin::Connected: + stateString = "Connected"; + break; + + case SipPlugin::Disconnected: + stateString = "Disconnected"; + break; + } + log.append( + QString("%2 (%1): %3 (%4)\n") + .arg(sip->name()) + .arg(sip->friendlyName()) + .arg(sip->accountName()) + .arg(stateString) + ); + + Q_FOREACH(const QString &peerId, sip->peersOnline()) + { + log.append( + QString(" %1\n") + .arg(peerId) + ); + } + log.append("\n"); + } + ui->logView->setPlainText(log); } - - From d7d883cd3cfd99ee8758b419d01f6062871c06c6 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 00:52:27 +0200 Subject: [PATCH 4/8] DiagnosticsDialog: add update and copy-to-clipboard button --- src/diagnosticsdialog.cpp | 14 ++++++++++++-- src/diagnosticsdialog.h | 2 ++ src/diagnosticsdialog.ui | 40 ++++++++++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index 2927f0ac1..8fc801059 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -23,6 +23,10 @@ #include #include +#include +#include +#include +#include DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) : QDialog( parent ) @@ -30,10 +34,10 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) { ui->setupUi( this ); + connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) ); + connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) ); connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); - ui->logView->setReadOnly(true); - updateLogView(); } @@ -83,3 +87,9 @@ void DiagnosticsDialog::updateLogView() ui->logView->setPlainText(log); } + +void DiagnosticsDialog::copyToClipboard() +{ + QApplication::clipboard()->setText( ui->logView->toPlainText() ); +} + diff --git a/src/diagnosticsdialog.h b/src/diagnosticsdialog.h index ab64ab23d..dac82aef3 100644 --- a/src/diagnosticsdialog.h +++ b/src/diagnosticsdialog.h @@ -37,6 +37,8 @@ public: private slots: void updateLogView(); + void copyToClipboard(); + private: Ui::DiagnosticsDialog* ui; }; diff --git a/src/diagnosticsdialog.ui b/src/diagnosticsdialog.ui index 992f96e51..fa7d7cfba 100644 --- a/src/diagnosticsdialog.ui +++ b/src/diagnosticsdialog.ui @@ -21,17 +21,39 @@ - + + + + + - - - Qt::Horizontal - - - QDialogButtonBox::Close - - + + + + + Update + + + + + + + Copy to Clipboard + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + + From 6e06e365732ec4c7aedfadecdc6ec1262e40bc4b Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 01:13:01 +0200 Subject: [PATCH 5/8] DiagnosticsDialog: Add SipInfo (visibility, ip and port) --- src/diagnosticsdialog.cpp | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index 8fc801059..213d32bdd 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -20,6 +20,7 @@ #include "ui_diagnosticsdialog.h" #include +#include #include #include @@ -44,11 +45,40 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) void DiagnosticsDialog::updateLogView() { QString log( - "Tomahawk Diagnostics Log\n\n" + "TOMAHAWK DIAGNOSTICS LOG\n\n" ); + // network + log.append( + "NETWORK:\n" + "General:\n" + ); + if( Servent::instance()->visibleExternally() ) + { + log.append( + QString( + "visible: true\n" + "host: %1\n" + "port: %2\n" + "\n" + ).arg( Servent::instance()->externalAddress() ) + .arg( Servent::instance()->externalPort() ) + + ); + } + else + { + log.append( + QString( + "visible: false" + ) + ); + } + log.append("\n\n"); + + // Peers - log.append("Sip Plugins:\n"); + log.append("SIP PLUGINS:\n"); Q_FOREACH(SipPlugin *sip, SipHandler::instance()->allPlugins()) { Q_ASSERT(sip); From 31c3c50292fcc74220d59e739e5532bcee7ca706 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 02:13:01 +0200 Subject: [PATCH 6/8] DiagnosticsDialog: Add more details on peers. Ugly caching in SipHandler, wanna avoid ugly-back-and-forth-json-parsing until we have a proper SipInfo class --- src/diagnosticsdialog.cpp | 33 +++++++++++++++++++++++++----- src/libtomahawk/sip/SipHandler.cpp | 8 +++++++- src/libtomahawk/sip/SipHandler.h | 5 ++++- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index 213d32bdd..ec2c0135e 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -79,6 +80,7 @@ void DiagnosticsDialog::updateLogView() // Peers log.append("SIP PLUGINS:\n"); + QList< Tomahawk::source_ptr > sources = SourceList::instance()->sources( true ); Q_FOREACH(SipPlugin *sip, SipHandler::instance()->allPlugins()) { Q_ASSERT(sip); @@ -105,12 +107,33 @@ void DiagnosticsDialog::updateLogView() .arg(stateString) ); - Q_FOREACH(const QString &peerId, sip->peersOnline()) + Q_FOREACH( const QString &peerId, sip->peersOnline() ) { - log.append( - QString(" %1\n") - .arg(peerId) - ); + bool connected = false; + Q_FOREACH( const Tomahawk::source_ptr &source, sources ) + { + if( source->controlConnection() ) + { + connected = true; + break; + } + } + + QVariantMap sipInfo = SipHandler::instance()->sipInfo( peerId ); + if( sipInfo.value( "visible").toBool() ) + log.append( + QString(" %1: %2:%3 (%4)\n") + .arg( peerId ) + .arg( sipInfo.value( "ip" ).toString() ) + .arg( sipInfo.value( "port" ).toString() ) + .arg( connected ? "connected" : "not connected") + ); + else + log.append( + QString(" %1: visible: false (%2)\n") + .arg( peerId ) + .arg( connected ? "connected" : "not connected") + ); } log.append("\n"); } diff --git a/src/libtomahawk/sip/SipHandler.cpp b/src/libtomahawk/sip/SipHandler.cpp index b1889c74e..2907ddb8e 100644 --- a/src/libtomahawk/sip/SipHandler.cpp +++ b/src/libtomahawk/sip/SipHandler.cpp @@ -80,7 +80,11 @@ const QPixmap SipHandler::avatar( const QString& name ) const } } - +const QVariantMap +SipHandler::sipInfo(const QString& peerId) const +{ + return m_peersSipInfos.value( peerId ); +} void SipHandler::onSettingsChanged() @@ -510,6 +514,8 @@ SipHandler::onMessage( const QString& from, const QString& msg ) { qDebug() << Q_FUNC_INFO << "They are not visible, doing nothing atm"; } + + m_peersSipInfos.insert( from, m ); } diff --git a/src/libtomahawk/sip/SipHandler.h b/src/libtomahawk/sip/SipHandler.h index e108c1d28..8fc7a222b 100644 --- a/src/libtomahawk/sip/SipHandler.h +++ b/src/libtomahawk/sip/SipHandler.h @@ -51,6 +51,8 @@ public: SipPluginFactory* factoryFromPlugin( SipPlugin* p ) const; const QPixmap avatar( const QString& name ) const; + //TODO: implement a proper SipInfo class and maybe attach it to the source + const QVariantMap sipInfo( const QString& peerId ) const; public slots: void checkSettings(); @@ -115,7 +117,8 @@ private: QList< SipPlugin* > m_connectedPlugins; bool m_connected; - + //TODO: move this to source + QHash m_peersSipInfos; QHash m_usernameAvatars; }; From 81c85b3fd5f0ac544489317a522424460fd59d8a Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 11:49:51 +0200 Subject: [PATCH 7/8] DiagnosticsDialog: Add current time (+ some micro formatting in the log) --- src/diagnosticsdialog.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index ec2c0135e..865cce92f 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -45,22 +45,25 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) void DiagnosticsDialog::updateLogView() { - QString log( - "TOMAHAWK DIAGNOSTICS LOG\n\n" + QString log; + + log.append( + QString("TOMAHAWK DIAGNOSTICS LOG -%1 \n\n") + .arg( QDateTime::currentDateTime().toString() ) ); // network log.append( "NETWORK:\n" - "General:\n" + " General:\n" ); if( Servent::instance()->visibleExternally() ) { log.append( QString( - "visible: true\n" - "host: %1\n" - "port: %2\n" + " visible: true\n" + " host: %1\n" + " port: %2\n" "\n" ).arg( Servent::instance()->externalAddress() ) .arg( Servent::instance()->externalPort() ) @@ -71,7 +74,7 @@ void DiagnosticsDialog::updateLogView() { log.append( QString( - "visible: false" + " visible: false" ) ); } @@ -100,7 +103,7 @@ void DiagnosticsDialog::updateLogView() break; } log.append( - QString("%2 (%1): %3 (%4)\n") + QString(" %2 (%1): %3 (%4)\n") .arg(sip->name()) .arg(sip->friendlyName()) .arg(sip->accountName()) @@ -122,7 +125,7 @@ void DiagnosticsDialog::updateLogView() QVariantMap sipInfo = SipHandler::instance()->sipInfo( peerId ); if( sipInfo.value( "visible").toBool() ) log.append( - QString(" %1: %2:%3 (%4)\n") + QString(" %1: %2:%3 (%4)\n") .arg( peerId ) .arg( sipInfo.value( "ip" ).toString() ) .arg( sipInfo.value( "port" ).toString() ) @@ -130,7 +133,7 @@ void DiagnosticsDialog::updateLogView() ); else log.append( - QString(" %1: visible: false (%2)\n") + QString(" %1: visible: false (%2)\n") .arg( peerId ) .arg( connected ? "connected" : "not connected") ); From b4eda751e04f244ac577c3d5e504fd7027588312 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 6 May 2011 11:51:27 +0200 Subject: [PATCH 8/8] sipjreen: emit peerOffline for all contacts when connection is lost, not when the plugin is asked to disconnect --- src/sip/jreen/jabber.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sip/jreen/jabber.cpp b/src/sip/jreen/jabber.cpp index 422f38796..70371458f 100644 --- a/src/sip/jreen/jabber.cpp +++ b/src/sip/jreen/jabber.cpp @@ -236,12 +236,6 @@ JabberPlugin::disconnectPlugin() return; } - foreach(const Jreen::JID &peer, m_peers.keys()) - { - handlePeerStatus(peer, Jreen::Presence::Unavailable); - } - - //m_roster->deleteLater(); //m_roster = 0; //m_room->deleteLater(); @@ -329,6 +323,11 @@ JabberPlugin::onDisconnect( Jreen::Client::DisconnectReason reason ) emit stateChanged( m_state ); removeMenuHelper(); + + Q_FOREACH(const Jreen::JID &peer, m_peers.keys()) + { + handlePeerStatus(peer, Jreen::Presence::Unavailable); + } } QString