From 7472d8d86a1da384104690db2a22977dcc135e24 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Wed, 29 Jan 2020 18:30:46 +0100 Subject: Replace manual xmlns writing by writeDefaultNamespace() This is the result of: sed -i 's/writeAttribute("xmlns", /writeDefaultNamespace(/g' \ $(find . -iname "*.cpp" -or -iname "*.h") --- src/base/QXmppElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base/QXmppElement.cpp') diff --git a/src/base/QXmppElement.cpp b/src/base/QXmppElement.cpp index 7570dbcf..fbf8762c 100644 --- a/src/base/QXmppElement.cpp +++ b/src/base/QXmppElement.cpp @@ -237,7 +237,7 @@ void QXmppElement::toXml(QXmlStreamWriter *writer) const writer->writeStartElement(d->name); if (d->attributes.contains("xmlns")) - writer->writeAttribute("xmlns", d->attributes.value("xmlns")); + writer->writeDefaultNamespace(d->attributes.value("xmlns")); for (const auto &attr : d->attributes.keys()) if (attr != "xmlns") helperToXmlAddAttribute(writer, attr, d->attributes.value(attr)); -- cgit v1.2.3