From 2298886f4d75adbc351b448274b39edf54da38ee Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 9 Oct 2020 09:44:52 +0200 Subject: Enable -DQURL_NO_CAST_FROM_STRING -DQT_NO_CAST_TO_ASCII I have those always enabled, which is how I detected these issues. This avoids QUrl/QString confusions, and QString/QByteArray confusions. --- src/base/QXmppRpcIq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base/QXmppRpcIq.cpp') diff --git a/src/base/QXmppRpcIq.cpp b/src/base/QXmppRpcIq.cpp index 40bd1fc6..ea3b9b7f 100644 --- a/src/base/QXmppRpcIq.cpp +++ b/src/base/QXmppRpcIq.cpp @@ -70,7 +70,7 @@ void QXmppRpcMarshaller::marshall(QXmlStreamWriter *writer, const QVariant &valu } case QVariant::Map: { writer->writeStartElement(QStringLiteral("struct")); - QMap map = value.toMap(); + const QMap map = value.toMap(); QMap::ConstIterator index = map.begin(); while (index != map.end()) { writer->writeStartElement(QStringLiteral("member")); -- cgit v1.2.3