diff options
Diffstat (limited to 'tests/auto')
7 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/nfccommons/qnearfieldtagtype1.cpp b/tests/auto/nfccommons/qnearfieldtagtype1.cpp index 11e9ea71..55e25001 100644 --- a/tests/auto/nfccommons/qnearfieldtagtype1.cpp +++ b/tests/auto/nfccommons/qnearfieldtagtype1.cpp @@ -244,11 +244,11 @@ void QNearFieldTagType1Private::progressToNextNdefWriteMessageState() m_tlvWriter = new QTlvWriter(q); // write old TLVs - for (const Tlv &tlv : qAsConst(m_tlvs)) + for (const Tlv &tlv : std::as_const(m_tlvs)) m_tlvWriter->writeTlv(tlv.first, tlv.second); // write new NDEF message TLVs - for (const QNdefMessage &message : qAsConst(m_ndefWriteMessages)) + for (const QNdefMessage &message : std::as_const(m_ndefWriteMessages)) m_tlvWriter->writeTlv(0x03, message.toByteArray()); // write terminator TLV diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index b9e0dfb3..262fac02 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -257,7 +257,7 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscovery_data() // Only need to test the first 5 live devices int max = 5; - for (const QBluetoothDeviceInfo &info : qAsConst(devices)) { + for (const QBluetoothDeviceInfo &info : std::as_const(devices)) { if (info.isCached()) continue; QTest::newRow("default filter") << info << QList<QBluetoothUuid>() 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); } } diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp index 6dbc0359..2784c98c 100644 --- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp +++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp @@ -362,7 +362,7 @@ void tst_QBluetoothSocket::tst_clientCommunication() { /* Send line by line with event loop */ - for (const QString &line : qAsConst(data)) { + for (const QString &line : std::as_const(data)) { QSignalSpy readyReadSpy(&socket, SIGNAL(readyRead())); QSignalSpy bytesWrittenSpy(&socket, SIGNAL(bytesWritten(qint64))); diff --git a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp index 64bdee2a..32e10b03 100644 --- a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp +++ b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp @@ -99,7 +99,7 @@ void tst_QLowEnergyCharacteristic::initTestCase() // find first service with descriptor QLowEnergyController *controller = 0; - for (const QBluetoothDeviceInfo &remoteDevice : qAsConst(remoteLeDevices)) { + for (const QBluetoothDeviceInfo &remoteDevice : std::as_const(remoteLeDevices)) { controller = QLowEnergyController::createCentral(remoteDevice, this); qDebug() << "Connecting to" << remoteDevice.name() << remoteDevice.address() << remoteDevice.deviceUuid(); diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index 5a930dc3..67a9659f 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -323,7 +323,7 @@ void tst_QLowEnergyController::tst_connect() listing.append(v.value<QBluetoothUuid>()); } - for (const QBluetoothUuid &uuid : qAsConst(foundServices)) { + for (const QBluetoothUuid &uuid : std::as_const(foundServices)) { QVERIFY2(listing.contains(uuid), uuid.toString().toLatin1()); @@ -342,7 +342,7 @@ void tst_QLowEnergyController::tst_connect() QBluetoothUuid(QBluetoothUuid::CharacteristicType::DeviceName))); // initiate characteristic discovery - for (QLowEnergyService *service : qAsConst(savedReferences)) { + for (QLowEnergyService *service : std::as_const(savedReferences)) { qDebug() << "Discovering" << service->serviceUuid(); QSignalSpy stateSpy(service, SIGNAL(stateChanged(QLowEnergyService::ServiceState))); @@ -359,7 +359,7 @@ void tst_QLowEnergyController::tst_connect() } // ensure that related service objects share same state - for (QLowEnergyService* originalService : qAsConst(savedReferences)) { + for (QLowEnergyService* originalService : std::as_const(savedReferences)) { QLowEnergyService *newService = control->createServiceObject( originalService->serviceUuid()); QVERIFY(newService); @@ -379,7 +379,7 @@ void tst_QLowEnergyController::tst_connect() } else { QCOMPARE(disconnectedSpy.size(), 1); // after disconnect all service references must be invalid - for (const QLowEnergyService *entry : qAsConst(savedReferences)) { + for (const QLowEnergyService *entry : std::as_const(savedReferences)) { const QBluetoothUuid &uuid = entry->serviceUuid(); QVERIFY2(entry->state() == QLowEnergyService::InvalidService, uuid.toString().toLatin1()); diff --git a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp index 535bf89a..b3046a52 100644 --- a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp +++ b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp @@ -86,7 +86,7 @@ void tst_QLowEnergyDescriptor::initTestCase() // find first service with descriptor QLowEnergyController *controller = nullptr; - for (const QBluetoothDeviceInfo& remoteDeviceInfo : qAsConst(remoteLeDeviceInfos)) { + for (const QBluetoothDeviceInfo& remoteDeviceInfo : std::as_const(remoteLeDeviceInfos)) { controller = QLowEnergyController::createCentral(remoteDeviceInfo, this); qDebug() << "Connecting to" << remoteDeviceInfo.address(); controller->connectToDevice(); |