summaryrefslogtreecommitdiff
path: root/tests/auto/qbluetoothserviceinfo
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-11-11 16:26:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-11-12 08:42:25 +0100
commit2f2e25c3beea21c14bb75b2f32b5ee4700759a89 (patch)
treeeff1132b9135642b076cec6796691f91bbd07188 /tests/auto/qbluetoothserviceinfo
parentcad49b3be482b41f1ae43b5c9ce4d009a810240b (diff)
downloadqtconnectivity-2f2e25c3beea21c14bb75b2f32b5ee4700759a89.tar.gz
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. This is a 6.4 re-run of the script we ran in dev, in order to avoid conflicts between the branches when cherry-picking. Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests/auto/qbluetoothserviceinfo')
-rw-r--r--tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
index f26b9053..fb8b5c4d 100644
--- a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
+++ b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
@@ -107,7 +107,7 @@ void tst_QBluetoothServiceInfo::tst_construction()
QCOMPARE(serviceInfo.serverChannel(), -1);
QCOMPARE(serviceInfo.protocolServiceMultiplexer(), -1);
- for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
+ for (QBluetoothUuid::ProtocolUuid u : std::as_const(protUuids))
QCOMPARE(serviceInfo.protocolDescriptor(u).size(), 0);
}
@@ -141,9 +141,9 @@ void tst_QBluetoothServiceInfo::tst_construction()
QCOMPARE(copyInfo.device().address(), alternatedeviceInfo.address());
QCOMPARE(serviceInfo.device().address(), alternatedeviceInfo.address());
- for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
+ for (QBluetoothUuid::ProtocolUuid u : std::as_const(protUuids))
QCOMPARE(serviceInfo.protocolDescriptor(u).size(), 0);
- for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
+ for (QBluetoothUuid::ProtocolUuid u : std::as_const(protUuids))
QCOMPARE(copyInfo.protocolDescriptor(u).size(), 0);
}
}