summaryrefslogtreecommitdiffstats
path: root/src/knx/knxproj/qknxdeviceinstance.cpp
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-06-09 13:22:51 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-06-10 14:15:25 +0200
commitb455feb8fe34317c3c99c7d470fbe28c34402a40 (patch)
tree6122703367ddcd0b91508575ae7868ce7dd26ac2 /src/knx/knxproj/qknxdeviceinstance.cpp
parentcf38426863ee0d3b0400821e1d95a1f9ef4d1f6d (diff)
Qt6: Port QtKnx to QStringView
Task-number: QTBUG-84319 Change-Id: I1f09e79d67b03f8e340b0e6cef84a1d7f5bc8613 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/knx/knxproj/qknxdeviceinstance.cpp')
-rw-r--r--src/knx/knxproj/qknxdeviceinstance.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/knx/knxproj/qknxdeviceinstance.cpp b/src/knx/knxproj/qknxdeviceinstance.cpp
index 8c27010..f772fe6 100644
--- a/src/knx/knxproj/qknxdeviceinstance.cpp
+++ b/src/knx/knxproj/qknxdeviceinstance.cpp
@@ -50,7 +50,7 @@ bool QKnxParameterInstanceRef::parseElement(QXmlStreamReader *reader, bool pedan
auto attrs = reader->attributes();
// required attributes
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(attrs, QLatin1String("RefId"), &attr, reader))
return false;
if (!QKnxProjectUtils::setNCName(QLatin1String("RefId"), attr, &RefId, reader, pedantic))
@@ -79,7 +79,7 @@ bool QKnxConnectors::parseElement(QXmlStreamReader *reader, bool pedantic)
auto fetchAttributes = [&](const QXmlStreamAttributes &attrs, QKnxConnector *connector) -> bool
{
// required attributes
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(attrs, QLatin1String("GroupAddressRefId"), &attr, reader))
return false;
if (!QKnxProjectUtils::setNCName(QLatin1String("GroupAddressRefId"), attr,
@@ -191,7 +191,7 @@ bool QKnxChannelInstance::parseElement(QXmlStreamReader *reader, bool pedantic)
auto attrs = reader->attributes();
// required attributes
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(attrs, QLatin1String("Id"), &attr, reader))
return false;
if (!QKnxProjectUtils::setNCName(QLatin1String("Id"), attr, &Id, reader, pedantic))
@@ -222,7 +222,7 @@ bool QKnxAdditionalAddress::parseElement(QXmlStreamReader *reader, bool pedantic
auto attrs = reader->attributes();
// required attributes
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(attrs, QStringLiteral("Address"), &attr, reader))
return false;
auto address = attr.toUInt();
@@ -368,7 +368,7 @@ bool QKnxBusInterface::parseElement(QXmlStreamReader *reader, bool pedantic)
reader->skipCurrentElement();
continue;
}
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(reader->attributes(),
QStringLiteral("GroupAddressRefId"), &attr, reader)) return false;
if (pedantic && !QKnxProjectUtils::isNCName(attr.toString()))
@@ -404,7 +404,7 @@ bool QKnxDeviceInstance::parseElement(QXmlStreamReader *reader, bool pedantic)
auto attrs = reader->attributes();
// required attributes
- QStringRef attr;
+ QStringView attr;
if (!QKnxProjectUtils::fetchAttr(attrs, QLatin1String("Id"), &attr, reader))
return false;
if (!QKnxProjectUtils::setNCName(QLatin1String("Id"), attr, &Id, reader, pedantic))