aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppClient.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-06-04 16:32:19 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-06-04 16:32:19 +0000
commitfa78a507c22f9c117f2fdd49cd2207d3ebe25e5d (patch)
tree3e26209ed1dc78e963d2161d46c5f333c1ddd617 /source/QXmppClient.cpp
parentcfd31d99c1747d7757cdd507b88b2bf7da751aa9 (diff)
downloadqxmpp-fa78a507c22f9c117f2fdd49cd2207d3ebe25e5d.tar.gz
make QXmppStream independent from QXmppClient
Diffstat (limited to 'source/QXmppClient.cpp')
-rw-r--r--source/QXmppClient.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/source/QXmppClient.cpp b/source/QXmppClient.cpp
index 3b514214..41e3d1b6 100644
--- a/source/QXmppClient.cpp
+++ b/source/QXmppClient.cpp
@@ -47,7 +47,11 @@ QXmppClient::QXmppClient(QObject *parent)
{
m_stream = new QXmppStream(this);
- bool check = connect(m_stream, SIGNAL(messageReceived(const QXmppMessage&)),
+ bool check = connect(m_stream, SIGNAL(elementReceived(const QDomElement&, bool&)),
+ this, SIGNAL(elementReceived(const QDomElement&, bool&)));
+ Q_ASSERT(check);
+
+ check = connect(m_stream, SIGNAL(messageReceived(const QXmppMessage&)),
this, SIGNAL(messageReceived(const QXmppMessage&)));
Q_ASSERT(check);
@@ -536,24 +540,6 @@ QXmppTransferManager& QXmppClient::getTransferManager()
return *m_transferManager;
}
-/// Reimplement in your subclass of QXmppClient if you want to handle
-/// raw XML elements yourself.
-///
-/// WARNING: you can seriously disrupt packet handling when doing this,
-/// so use with care and at your own risk.
-///
-/// Return true if you handled the element yourself, or false if
-/// you want to use the default handling for the element.
-///
-/// If you handle the element yourself, QXmpp will do absolutely no
-/// processing itself, so do not expect the usual signals to trigger.
-
-bool QXmppClient::handleStreamElement(const QDomElement &element)
-{
- Q_UNUSED(element);
- return false;
-}
-
/// Returns the QXmppLogger associated with the current QXmppClient.
QXmppLogger *QXmppClient::logger()