diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-08-12 11:58:54 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-08-19 19:48:03 +0200 |
commit | a8028a02df32355f4df4c036dbb82e9f8e8d527f (patch) | |
tree | ca5ae77f5de57a7828a526d85e702e053b63e727 /examples/network | |
parent | a2cec17407b83aed23b01065f4e10d32008552e1 (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/network')
-rw-r--r-- | examples/network/googlesuggest/googlesuggest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp index 04a60103b2..b7b6d3ab62 100644 --- a/examples/network/googlesuggest/googlesuggest.cpp +++ b/examples/network/googlesuggest/googlesuggest.cpp @@ -217,8 +217,8 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply) while (!xml.atEnd()) { xml.readNext(); if (xml.tokenType() == QXmlStreamReader::StartElement) - if (xml.name() == "suggestion") { - QStringRef str = xml.attributes().value("data"); + if (xml.name() == u"suggestion") { + auto str = xml.attributes().value("data"); choices << str.toString(); } } |