[Telepathy-commits] [telepathy-qt4/master] Connection: Added more PendingChannel debug messages.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue Jan 27 04:54:19 PST 2009


---
 TelepathyQt4/Client/pending-channel.cpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/Client/pending-channel.cpp b/TelepathyQt4/Client/pending-channel.cpp
index 2f762ca..40c5321 100644
--- a/TelepathyQt4/Client/pending-channel.cpp
+++ b/TelepathyQt4/Client/pending-channel.cpp
@@ -146,6 +146,13 @@ Connection *PendingChannel::connection() const
  */
 bool PendingChannel::yours() const
 {
+    if (!isFinished()) {
+        warning() << "PendingChannel::yours called before finished, returning undefined value";
+    }
+    else if (!isValid()) {
+        warning() << "PendingChannel::yours called when not valid, returning undefined value";
+    }
+
     return mPriv->yours;
 }
 
@@ -194,7 +201,8 @@ Channel *PendingChannel::channel(QObject *parent) const
     if (!isFinished()) {
         warning() << "PendingChannel::channel called before finished, returning 0";
         return 0;
-    } else if (!isValid()) {
+    }
+    else if (!isValid()) {
         warning() << "PendingChannel::channel called when not valid, returning 0";
         return 0;
     }
-- 
1.5.6.5




More information about the Telepathy-commits mailing list