aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppBindIq.cpp
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb.prv@gmx.de>2020-03-22 22:24:26 +0100
committerLNJ <lnj@kaidan.im>2020-03-28 18:07:47 +0100
commit1ac7b9d2a25d50b7680bd75ff68f29055b196d80 (patch)
tree9adf6bbeefd37ed2fe1dbd23592d321183c6e87b /src/base/QXmppBindIq.cpp
parent88451aa1597afd0a1a1c3b3fb59d5a95d3011736 (diff)
downloadqxmpp-1ac7b9d2a25d50b7680bd75ff68f29055b196d80.tar.gz
base: Convert to QStringLiteral
Two new macros were added: * QBL (short alias for QByteArrayLiteral) * QSL (short alias for QStringLiteral)
Diffstat (limited to 'src/base/QXmppBindIq.cpp')
-rw-r--r--src/base/QXmppBindIq.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/base/QXmppBindIq.cpp b/src/base/QXmppBindIq.cpp
index 0089b860..20d89074 100644
--- a/src/base/QXmppBindIq.cpp
+++ b/src/base/QXmppBindIq.cpp
@@ -68,25 +68,25 @@ void QXmppBindIq::setResource(const QString &resource)
/// \cond
bool QXmppBindIq::isBindIq(const QDomElement &element)
{
- QDomElement bindElement = element.firstChildElement("bind");
+ QDomElement bindElement = element.firstChildElement(QSL("bind"));
return (bindElement.namespaceURI() == ns_bind);
}
void QXmppBindIq::parseElementFromChild(const QDomElement &element)
{
- QDomElement bindElement = element.firstChildElement("bind");
- m_jid = bindElement.firstChildElement("jid").text();
- m_resource = bindElement.firstChildElement("resource").text();
+ QDomElement bindElement = element.firstChildElement(QSL("bind"));
+ m_jid = bindElement.firstChildElement(QSL("jid")).text();
+ m_resource = bindElement.firstChildElement(QSL("resource")).text();
}
void QXmppBindIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
{
- writer->writeStartElement("bind");
+ writer->writeStartElement(QSL("bind"));
writer->writeDefaultNamespace(ns_bind);
if (!m_jid.isEmpty())
- helperToXmlAddTextElement(writer, "jid", m_jid);
+ helperToXmlAddTextElement(writer, QSL("jid"), m_jid);
if (!m_resource.isEmpty())
- helperToXmlAddTextElement(writer, "resource", m_resource);
+ helperToXmlAddTextElement(writer, QSL("resource"), m_resource);
writer->writeEndElement();
}
/// \endcond