diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-03 12:58:12 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-03 12:58:12 +0200 |
| commit | 311778c569f2f97c4b99d2c8afea81dbc368dcc7 (patch) | |
| tree | f48127e5267216da9f4437b3d0c8837e8ce660dc /src/base/QXmppStanza.cpp | |
| parent | 7dff3ee250cfea98be51843b3f4be1f8f909540f (diff) | |
| download | qxmpp-311778c569f2f97c4b99d2c8afea81dbc368dcc7.tar.gz | |
add extended addresses to QXmppMessage and QXmppPresence
Diffstat (limited to 'src/base/QXmppStanza.cpp')
| -rw-r--r-- | src/base/QXmppStanza.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/base/QXmppStanza.cpp b/src/base/QXmppStanza.cpp index f73010ee..4a02b6c2 100644 --- a/src/base/QXmppStanza.cpp +++ b/src/base/QXmppStanza.cpp @@ -606,15 +606,8 @@ void QXmppStanza::parse(const QDomElement &element) } } -void QXmppStanza::toXmlElementFromChild(QXmlStreamWriter *xmlWriter) const +void QXmppStanza::extensionsToXml(QXmlStreamWriter *xmlWriter) const { - helperToXmlAddAttribute(xmlWriter, "xml:lang", d->lang); - helperToXmlAddAttribute(xmlWriter, "id", d->id); - helperToXmlAddAttribute(xmlWriter, "to", d->to); - helperToXmlAddAttribute(xmlWriter, "from", d->from); - - d->error.toXml(xmlWriter); - // XEP-0033: Extended Stanza Addressing if (!d->extendedAddresses.isEmpty()) { xmlWriter->writeStartElement("addresses"); @@ -623,6 +616,10 @@ void QXmppStanza::toXmlElementFromChild(QXmlStreamWriter *xmlWriter) const address.toXml(xmlWriter); xmlWriter->writeEndElement(); } + + // other extensions + foreach (const QXmppElement &extension, d->extensions) + extension.toXml(xmlWriter); } /// \endcond |
