[telepathy-qt4/master] ChannelFactory: Warn when the user tries to create a FileTransferChannel without the Requested property set in immutableProperties.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue Sep 22 18:11:39 PDT 2009


---
 TelepathyQt4/channel-factory.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/channel-factory.cpp b/TelepathyQt4/channel-factory.cpp
index 63bb002..e7403f2 100644
--- a/TelepathyQt4/channel-factory.cpp
+++ b/TelepathyQt4/channel-factory.cpp
@@ -21,6 +21,8 @@
 
 #include "TelepathyQt4/channel-factory.h"
 
+#include "TelepathyQt4/debug-internal.h"
+
 #include <TelepathyQt4/Channel>
 #include <TelepathyQt4/Connection>
 #include <TelepathyQt4/Constants>
@@ -69,6 +71,10 @@ ChannelPtr ChannelFactory::create(const ConnectionPtr &connection,
                                 channelPath, immutableProperties).data()));
             }
         } else {
+            warning() << "Trying to create a channel of type FileTransfer "
+                "without the " TELEPATHY_INTERFACE_CHANNEL ".Requested "
+                "property set in immutableProperties, returning a "
+                "FileTransferChannel instance";
             return ChannelPtr(dynamic_cast<Channel*>(
                         FileTransferChannel::create(connection,
                             channelPath, immutableProperties).data()));
-- 
1.5.6.5




More information about the telepathy-commits mailing list