summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-08-24 10:42:04 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 08:48:38 +0000
commit316cd73be26a95c509eba613cdb65cbfa7a5c73f (patch)
tree054a52f0013a01fc6d004931f6d838c0ba791ea2 /examples
parentcc50be48e8a67ceabf293abce5a1a6a9f9d6f8c2 (diff)
downloadqtsvg-316cd73be26a95c509eba613cdb65cbfa7a5c73f.tar.gz
weatherinfo: fix compilation after QXmlStreamReader QStringView change
Change-Id: I3115c0a6abaf2748c3bfc01655bf2eb1d0d9cd50 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/svg/embedded/weatherinfo/weatherinfo.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/svg/embedded/weatherinfo/weatherinfo.cpp b/examples/svg/embedded/weatherinfo/weatherinfo.cpp
index bbcba4f..2da9b9f 100644
--- a/examples/svg/embedded/weatherinfo/weatherinfo.cpp
+++ b/examples/svg/embedded/weatherinfo/weatherinfo.cpp
@@ -266,11 +266,11 @@ private:
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "location") {
+ if (xml.name() == u"location") {
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "name") {
+ if (xml.name() == u"name") {
city = xml.readElementText();
m_cityItem->setPlainText(city);
setWindowTitle(city);
@@ -279,22 +279,22 @@ private:
}
}
}
- } else if (xml.name() == "credit") {
+ } else if (xml.name() == u"credit") {
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "link") {
+ if (xml.name() == u"link") {
m_copyright->setHtml(QString("<td align=\"center\">%1 <a href=\"%2\">(source)</a></td>").arg(GET_DATA_ATTR("text")).arg(GET_DATA_ATTR("url")));
xml.skipCurrentElement();
break;
}
}
}
- } else if (xml.name() == "tabular") {
+ } else if (xml.name() == u"tabular") {
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "time") {
+ if (xml.name() == u"time") {
if (!foundCurrentForecast) {
QString temperature;
QString symbol;
@@ -315,7 +315,7 @@ private:
}
}
}
- } else if (xml.name() != "weatherdata" && xml.name() != "forecast" && xml.name() != "credit"){
+ } else if (xml.name() != u"weatherdata" && xml.name() != u"forecast" && xml.name() != u"credit"){
xml.skipCurrentElement();
}
}
@@ -354,7 +354,7 @@ private:
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "time") {
+ if (xml.name() == u"time") {
QString period = GET_DATA_ATTR("period");
// save data if new day starts
if (period == "0") {
@@ -418,14 +418,14 @@ private:
while (!xml.atEnd()) {
xml.readNext();
if (xml.tokenType() == QXmlStreamReader::StartElement) {
- if (xml.name() == "symbol") {
+ if (xml.name() == u"symbol") {
QString condition = GET_DATA_ATTR("name");
symbol = extractIcon(condition);
if (m_conditionItem->toPlainText().isEmpty())
m_conditionItem->setPlainText(condition);
foundIcon = true;
}
- if (xml.name() == "temperature") {
+ if (xml.name() == u"temperature") {
temp = GET_DATA_ATTR("value");
foundTemp = true;
}