From ce1ab59604a8f430f8f0d293ca28072020b22235 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Sun, 20 Sep 2009 03:21:10 +0000 Subject: setReconnectionManager bug and documentation update --- source/QXmppClient.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source/QXmppClient.cpp') diff --git a/source/QXmppClient.cpp b/source/QXmppClient.cpp index 5940860a..e139476b 100644 --- a/source/QXmppClient.cpp +++ b/source/QXmppClient.cpp @@ -285,12 +285,15 @@ QXmppReconnectionManager* QXmppClient::getReconnectionManager() /// Sets the user defined reconnection manager. /// -/// \return true if all the signal-slot connections are done correctly. +/// \return true if all the signal-slot connections are made correctly. /// bool QXmppClient::setReconnectionManager(QXmppReconnectionManager* reconnectionManager) { + if(!reconnectionManager) + return false; + if(m_reconnectionManager) delete m_reconnectionManager; @@ -299,11 +302,15 @@ bool QXmppClient::setReconnectionManager(QXmppReconnectionManager* bool check = connect(this, SIGNAL(connected()), m_reconnectionManager, SLOT(connected())); Q_ASSERT(check); + if(!check) + return false; check = connect(this, SIGNAL(error(QXmppClient::Error)), m_reconnectionManager, SLOT(error(QXmppClient::Error))); Q_ASSERT(check); - + if(!check) + return false; + return true; } -- cgit v1.2.3