aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/QXmppIq.cpp5
-rw-r--r--source/QXmppIq.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/source/QXmppIq.cpp b/source/QXmppIq.cpp
index 55d72748..c4215d5f 100644
--- a/source/QXmppIq.cpp
+++ b/source/QXmppIq.cpp
@@ -52,9 +52,12 @@ void QXmppIq::setType(QXmppIq::Type type)
void QXmppIq::parse(const QDomElement &element)
{
QXmppStanza::parse(element);
-
setTypeFromStr(element.attribute("type"));
+ parseElementFromChild(element);
+}
+void QXmppIq::parseElementFromChild(const QDomElement &element)
+{
QXmppElementList extensions;
QDomElement itemElement = element.firstChildElement();
while (!itemElement.isNull())
diff --git a/source/QXmppIq.h b/source/QXmppIq.h
index 0796ef3c..65dfdb4a 100644
--- a/source/QXmppIq.h
+++ b/source/QXmppIq.h
@@ -52,12 +52,14 @@ public:
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
- virtual void toXmlElementFromChild(QXmlStreamWriter *writer) const;
// deprecated accessors, use the form without "get" instead
QXmppIq::Type Q_DECL_DEPRECATED getType() const;
protected:
+ virtual void parseElementFromChild(const QDomElement &element);
+ virtual void toXmlElementFromChild(QXmlStreamWriter *writer) const;
+
QString getTypeStr() const;
void setTypeFromStr(const QString& str);