[Telepathy-commits] [telepathy-qt4/master] Improved debug output

Stefan Eilers stefan.eilers at basyskom.de
Tue Jan 27 07:57:59 PST 2009


---
 TelepathyQt4/Prototype/ContactManager.cpp  |   13 +++++++------
 TelepathyQt4/Prototype/PresenceManager.cpp |    7 +++++--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/TelepathyQt4/Prototype/ContactManager.cpp b/TelepathyQt4/Prototype/ContactManager.cpp
index 81b9027..79cd0a6 100644
--- a/TelepathyQt4/Prototype/ContactManager.cpp
+++ b/TelepathyQt4/Prototype/ContactManager.cpp
@@ -719,13 +719,14 @@ void ContactManager::slotMembersChanged(const QString& message,
 {
     Q_UNUSED(actor);
     Q_UNUSED(reason);
-//    Q_UNUSED(message);
 
-//    qDebug() << "Members Changed" << message << "Actor" << actor << "Reason" <<reason;
-//    qDebug() << "Members Added" << members_added.size();
-//    qDebug() << "Members Removed" << members_removed.size();
-//    qDebug() << "Members Local Pending" << local_pending.size();
-//    qDebug() << "Members Remote Pending" << remote_pending.size();
+#ifdef ENABLE_DEBUG_OUTPUT_
+    qDebug() << "Members Changed" << message << "Actor" << actor << "Reason" <<reason;
+    qDebug() << "Members Added" << members_added.size();
+    qDebug() << "Members Removed" << members_removed.size();
+    qDebug() << "Members Local Pending" << local_pending.size();
+    qDebug() << "Members Remote Pending" << remote_pending.size();
+#endif
     // Figure out handles that we need to look up.
     // Batch them up to minimize roundtrips.
     
diff --git a/TelepathyQt4/Prototype/PresenceManager.cpp b/TelepathyQt4/Prototype/PresenceManager.cpp
index 7c19465..078fb45 100644
--- a/TelepathyQt4/Prototype/PresenceManager.cpp
+++ b/TelepathyQt4/Prototype/PresenceManager.cpp
@@ -373,7 +373,7 @@ Telepathy::SimpleContactPresences PresenceManager::presencesForContacts( const Q
 
                 contact=contacts.at( i);
 #ifdef ENABLE_DEBUG_OUTPUT_
-                qDebug() << "Contact "<< key << "Status" <<presences.value( key ).status << "Message:" << presences.value( key ).statusMessage;
+                qDebug() << "Contact "<< key << "Type:" <<  contact->type() << "Status" <<presences.value( key ).status << "Message:" << presences.value( key ).statusMessage;
 #endif
                 if (contact->telepathyHandle()==key)
                 {
@@ -436,6 +436,9 @@ Telepathy::SimpleContactPresences PresenceManager::presencesForContacts( const Q
 // Called by the _simple_ presence interface if presence were updated
 void PresenceManager::slotPresencesChanged( const Telepathy::SimpleContactPresences& presences )
 {
+#ifdef ENABLE_DEBUG_OUTPUT_
+    qDebug() << __PRETTY_FUNCTION__;
+#endif
     if ( !d->m_pConnection )
     {
         qWarning() << "PresenceManager::slotPresencesChanged(): Received a presence changed signal but no connection object exists!";
@@ -486,7 +489,7 @@ void PresenceManager::slotPresencesChanged( const Telepathy::SimpleContactPresen
                 found_contact->setPresenceMessage(changed_presence.statusMessage);
 
 #ifdef ENABLE_DEBUG_OUTPUT_
-                qDebug() << "PresenceManager::slotPresencesChanged() -> signalRemotePresencesUpdated";
+                qDebug() << "PresenceManager::slotPresencesChanged() -> signalRemotePresencesUpdated (contact: " << found_contact->name() << "type:" << found_contact->type() << ")";
 #endif
                 emit signalRemotePresencesUpdated( found_contact, changed_presence );
             }
-- 
1.5.6.5




More information about the Telepathy-commits mailing list