From bb95ebd0e305071ccea30e356844042402bcd76b Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 4 Mar 2010 08:43:53 +0000 Subject: regroup common stanza parsing inside QXmppStanza::parse() --- source/QXmppByteStreamIq.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/QXmppByteStreamIq.cpp') diff --git a/source/QXmppByteStreamIq.cpp b/source/QXmppByteStreamIq.cpp index 237488cc..03af6130 100644 --- a/source/QXmppByteStreamIq.cpp +++ b/source/QXmppByteStreamIq.cpp @@ -117,16 +117,15 @@ void QXmppByteStreamIq::setStreamHostUsed(const QString &jid) m_streamHostUsed = jid; } -bool QXmppByteStreamIq::isByteStreamIq(QDomElement &element) +bool QXmppByteStreamIq::isByteStreamIq(const QDomElement &element) { return element.firstChildElement("query").namespaceURI() == ns_bytestreams; } -void QXmppByteStreamIq::parse(QDomElement &element) +void QXmppByteStreamIq::parse(const QDomElement &element) { - setId(element.attribute("id")); - setFrom(element.attribute("from")); - setTo(element.attribute("to")); + QXmppStanza::parse(element); + setTypeFromStr(element.attribute("type")); QDomElement queryElement = element.firstChildElement("query"); -- cgit v1.2.3