diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-08-19 11:53:24 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-08-19 11:53:24 +0000 |
| commit | 47709babf194fdc8fa71eb188782e737f0004a9a (patch) | |
| tree | 2c26e2341d755c66a25808be679af40dd92d5602 /src | |
| parent | e989b42ed41e30baf3426bfbbf7b46aa1fe499ae (diff) | |
| download | qxmpp-47709babf194fdc8fa71eb188782e737f0004a9a.tar.gz | |
mark disconnect deprecated and use disconnectFromServer instead
Diffstat (limited to 'src')
| -rw-r--r-- | src/QXmppClient.cpp | 9 | ||||
| -rw-r--r-- | src/QXmppClient.h | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/QXmppClient.cpp b/src/QXmppClient.cpp index 19fb1c07..a6dcec30 100644 --- a/src/QXmppClient.cpp +++ b/src/QXmppClient.cpp @@ -305,10 +305,10 @@ bool QXmppClient::sendPacket(const QXmppPacket& packet) /// /// \note Make sure that the clientPresence is changed to /// QXmppPresence::Available, if you are again calling connectToServer() after -/// calling the disconnect() function. +/// calling the disconnectFromServer() function. /// -void QXmppClient::disconnect() +void QXmppClient::disconnectFromServer() { d->clientPresence.setType(QXmppPresence::Unavailable); d->clientPresence.status().setType(QXmppPresence::Status::Offline); @@ -320,6 +320,11 @@ void QXmppClient::disconnect() } } +void QXmppClient::disconnect() +{ + disconnectFromServer(); +} + /// Returns true if the client is connected to the XMPP server. /// diff --git a/src/QXmppClient.h b/src/QXmppClient.h index f7de191f..4d3bc7c7 100644 --- a/src/QXmppClient.h +++ b/src/QXmppClient.h @@ -108,7 +108,7 @@ public: void connectToServer(const QXmppConfiguration&, const QXmppPresence& initialPresence = QXmppPresence()); - void disconnect(); + void disconnectFromServer(); bool isConnected() const; QXmppPresence clientPresence() const; @@ -158,6 +158,9 @@ public: QAbstractSocket::SocketError Q_DECL_DEPRECATED getSocketError(); QXmppStanza::Error::Condition Q_DECL_DEPRECATED getXmppStreamError(); + /// was clashing with QObject::disconnect use disconnectFromServer() instead + void Q_DECL_DEPRECATED disconnect(); + // deprecated methods, use setClientPresence(QXmppPresence) instead. void Q_DECL_DEPRECATED setClientPresence(const QString& statusText); void Q_DECL_DEPRECATED setClientPresence(QXmppPresence::Type presenceType); |
