From a8028a02df32355f4df4c036dbb82e9f8e8d527f Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Wed, 12 Aug 2020 11:58:54 +0200 Subject: Port the QXmlStream API from QStringRef to QStringView This gives some source incompatibilities, most of them can be handled by using auto instead of QStringRef explicitly. [ChangeLog][Important API changes] QXmlStream now uses QStringView insteead of QStringRef in it's API. Using auto forvariables returning a QStringRef in Qt 5 should lead to code that can be used against both Qt versions. Fixes: QTBUG-84317 Change-Id: I6df3a9507276f5d16d044a6bdbe0e4810cf99440 Reviewed-by: Maurice Kalinowski --- examples/xml/rsslisting/rsslisting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/xml') diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp index 143ad6dcba..0d68d1792a 100644 --- a/examples/xml/rsslisting/rsslisting.cpp +++ b/examples/xml/rsslisting/rsslisting.cpp @@ -214,11 +214,11 @@ void RSSListing::parseXml() while (!xml.atEnd()) { xml.readNext(); if (xml.isStartElement()) { - if (xml.name() == "item") + if (xml.name() == u"item") linkString = xml.attributes().value("rss:about").toString(); currentTag = xml.name().toString(); } else if (xml.isEndElement()) { - if (xml.name() == "item") { + if (xml.name() == u"item") { QTreeWidgetItem *item = new QTreeWidgetItem; item->setText(0, titleString); -- cgit v1.2.3