diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-19 17:30:04 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-19 17:30:04 +0000 |
| commit | 68b7f71c483fdaa820f95496c6a4b640dd13f610 (patch) | |
| tree | bcc59a4a9c58fc69c61893c5e6a828a21bf7e4f4 /source/QXmppMessage.cpp | |
| parent | a64840aee77b706ca62a8b80a51857e79639231e (diff) | |
| download | qxmpp-68b7f71c483fdaa820f95496c6a4b640dd13f610.tar.gz | |
allow multiple extensions for XMPP stanzas
Diffstat (limited to 'source/QXmppMessage.cpp')
| -rw-r--r-- | source/QXmppMessage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/QXmppMessage.cpp b/source/QXmppMessage.cpp index 78fc75d4..72ae50c2 100644 --- a/source/QXmppMessage.cpp +++ b/source/QXmppMessage.cpp @@ -161,7 +161,7 @@ void QXmppMessage::parse(QDomElement &element) QDomElement xElement = element.firstChildElement("x"); if(!xElement.isNull()) - setExtension(QXmppElement(xElement)); + setExtensions(QXmppElement(xElement)); } void QXmppMessage::toXml(QXmlStreamWriter *xmlWriter) const @@ -187,7 +187,8 @@ void QXmppMessage::toXml(QXmlStreamWriter *xmlWriter) const xmlWriter->writeEndElement(); } - getExtension().toXml(xmlWriter); + foreach (const QXmppElement &extension, getExtensions()) + extension.toXml(xmlWriter); xmlWriter->writeEndElement(); } |
