aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppDiscoveryIq.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-03-04 08:43:53 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-03-04 08:43:53 +0000
commitbb95ebd0e305071ccea30e356844042402bcd76b (patch)
tree8290d542d1c53c81828a3f8a5d45cf387a4c72d7 /source/QXmppDiscoveryIq.cpp
parentf3c8579fd664461f529d2fe4713093596ba9ff97 (diff)
downloadqxmpp-bb95ebd0e305071ccea30e356844042402bcd76b.tar.gz
regroup common stanza parsing inside QXmppStanza::parse()
Diffstat (limited to 'source/QXmppDiscoveryIq.cpp')
-rw-r--r--source/QXmppDiscoveryIq.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/QXmppDiscoveryIq.cpp b/source/QXmppDiscoveryIq.cpp
index b54df435..36052dd6 100644
--- a/source/QXmppDiscoveryIq.cpp
+++ b/source/QXmppDiscoveryIq.cpp
@@ -47,18 +47,17 @@ void QXmppDiscoveryIq::setQueryType(enum QXmppDiscoveryIq::QueryType type)
m_queryType = type;
}
-bool QXmppDiscoveryIq::isDiscoveryIq( QDomElement &element )
+bool QXmppDiscoveryIq::isDiscoveryIq(const QDomElement &element)
{
QDomElement queryElement = element.firstChildElement("query");
return (queryElement.namespaceURI() == ns_disco_info ||
queryElement.namespaceURI() == ns_disco_items);
}
-void QXmppDiscoveryIq::parse( QDomElement &element )
+void QXmppDiscoveryIq::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");
if (queryElement.namespaceURI() == ns_disco_items)