summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothserviceinfo
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-08-14 11:08:18 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-08-15 07:56:46 +0000
commita0ade068004ad869d6235ae8d6cd5e2050bf765d (patch)
tree42c949ba2fa7fcd4ab5356293d1ef3cad1c436f6 /tests/auto/qbluetoothserviceinfo
parent84f0e76c647e7f09529b79525b2d4fbc698576d8 (diff)
Replace foreach with for loop and set QT_NO_FOREACH
To avoid unnecessary copies, const is used wherever possible. Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@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 eb7ce85a..ae8cf5d0 100644
--- a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
+++ b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
@@ -132,7 +132,7 @@ void tst_QBluetoothServiceInfo::tst_construction()
QCOMPARE(serviceInfo.serverChannel(), -1);
QCOMPARE(serviceInfo.protocolServiceMultiplexer(), -1);
- foreach (QBluetoothUuid::ProtocolUuid u, protUuids)
+ for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
QCOMPARE(serviceInfo.protocolDescriptor(u).count(), 0);
}
@@ -166,9 +166,9 @@ void tst_QBluetoothServiceInfo::tst_construction()
QCOMPARE(copyInfo.device().address(), alternatedeviceInfo.address());
QCOMPARE(serviceInfo.device().address(), alternatedeviceInfo.address());
- foreach (QBluetoothUuid::ProtocolUuid u, protUuids)
+ for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
QCOMPARE(serviceInfo.protocolDescriptor(u).count(), 0);
- foreach (QBluetoothUuid::ProtocolUuid u, protUuids)
+ for (QBluetoothUuid::ProtocolUuid u : qAsConst(protUuids))
QCOMPARE(copyInfo.protocolDescriptor(u).count(), 0);
}
}