aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppClient.cpp
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2009-09-20 03:21:10 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2009-09-20 03:21:10 +0000
commitce1ab59604a8f430f8f0d293ca28072020b22235 (patch)
tree26edcbc1840204f96d3c9b58ff3086211ddd41db /source/QXmppClient.cpp
parent93f275fa9abd0a95f4a915417bec9ac25bc1cd23 (diff)
downloadqxmpp-ce1ab59604a8f430f8f0d293ca28072020b22235.tar.gz
setReconnectionManager bug and documentation update
Diffstat (limited to 'source/QXmppClient.cpp')
-rw-r--r--source/QXmppClient.cpp11
1 files changed, 9 insertions, 2 deletions
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;
}