summaryrefslogtreecommitdiffstats
path: root/examples/xml
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-08-12 11:58:54 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-08-19 19:48:03 +0200
commita8028a02df32355f4df4c036dbb82e9f8e8d527f (patch)
treeca5ae77f5de57a7828a526d85e702e053b63e727 /examples/xml
parenta2cec17407b83aed23b01065f4e10d32008552e1 (diff)
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 <maurice.kalinowski@qt.io>
Diffstat (limited to 'examples/xml')
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp4
1 files changed, 2 insertions, 2 deletions
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);