From 33056a200b1cf044201fd37d694197eea315bb26 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 17 Sep 2012 20:25:24 +0200 Subject: Allow StreamHost::host to contain a host name --- src/base/QXmppByteStreamIq.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/base/QXmppByteStreamIq.cpp') diff --git a/src/base/QXmppByteStreamIq.cpp b/src/base/QXmppByteStreamIq.cpp index 0e17cc48..c3926220 100644 --- a/src/base/QXmppByteStreamIq.cpp +++ b/src/base/QXmppByteStreamIq.cpp @@ -27,12 +27,12 @@ #include "QXmppConstants.h" #include "QXmppUtils.h" -QHostAddress QXmppByteStreamIq::StreamHost::host() const +QString QXmppByteStreamIq::StreamHost::host() const { return m_host; } -void QXmppByteStreamIq::StreamHost::setHost(const QHostAddress &host) +void QXmppByteStreamIq::StreamHost::setHost(const QString &host) { m_host = host; } @@ -139,7 +139,7 @@ void QXmppByteStreamIq::parseElementFromChild(const QDomElement &element) while (!hostElement.isNull()) { StreamHost streamHost; - streamHost.setHost(QHostAddress(hostElement.attribute("host"))); + streamHost.setHost(hostElement.attribute("host")); streamHost.setJid(hostElement.attribute("jid")); streamHost.setPort(hostElement.attribute("port").toInt()); streamHost.setZeroconf(hostElement.attribute("zeroconf")); @@ -165,7 +165,7 @@ void QXmppByteStreamIq::toXmlElementFromChild(QXmlStreamWriter *writer) const foreach (const StreamHost& streamHost, m_streamHosts) { writer->writeStartElement("streamhost"); - helperToXmlAddAttribute(writer, "host", streamHost.host().toString()); + helperToXmlAddAttribute(writer, "host", streamHost.host()); helperToXmlAddAttribute(writer, "jid", streamHost.jid()); helperToXmlAddAttribute(writer, "port", QString::number(streamHost.port())); helperToXmlAddAttribute(writer, "zeroconf", streamHost.zeroconf()); -- cgit v1.2.3