diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-15 15:46:31 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-15 15:46:31 +0000 |
| commit | d18646274885a4dcc376094e372f24b6922155b8 (patch) | |
| tree | 4524f76ba84d3d37f99dbf613de319a246a8c047 /source/QXmppIq.cpp | |
| parent | c8a91ae73da178bdb9fdb235b7f09e9d49724caa (diff) | |
| download | qxmpp-d18646274885a4dcc376094e372f24b6922155b8.tar.gz | |
rework generic Iq items access
Diffstat (limited to 'source/QXmppIq.cpp')
| -rw-r--r-- | source/QXmppIq.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/source/QXmppIq.cpp b/source/QXmppIq.cpp index 6c2fe257..a28e6f8d 100644 --- a/source/QXmppIq.cpp +++ b/source/QXmppIq.cpp @@ -73,13 +73,8 @@ void QXmppIq::toXml( QXmlStreamWriter *xmlWriter ) const void QXmppIq::toXmlElementFromChild( QXmlStreamWriter *writer ) const { - if (m_queryNamespace.isEmpty() && m_queryItems.isEmpty()) - return; - writer->writeStartElement("query"); - helperToXmlAddAttribute(writer, "xmlns", m_queryNamespace); - foreach (const QXmppElement &item, m_queryItems) + foreach (const QXmppElement &item, m_items) item.toXml(writer); - writer->writeEndElement(); } QString QXmppIq::getTypeStr() const @@ -131,23 +126,13 @@ void QXmppIq::setTypeFromStr(const QString& str) } } -QList<QXmppElement> QXmppIq::getQueryItems() const -{ - return m_queryItems; -} - -void QXmppIq::setQueryItems(const QList<QXmppElement> &items) -{ - m_queryItems = items; -} - -QString QXmppIq::getQueryNamespace() const +QList<QXmppElement> QXmppIq::getItems() const { - return m_queryNamespace; + return m_items; } -void QXmppIq::setQueryNamespace(const QString &ns) +void QXmppIq::setItems(const QList<QXmppElement> &items) { - m_queryNamespace = ns; + m_items = items; } |
