diff options
Diffstat (limited to 'tests')
6 files changed, 15 insertions, 15 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index d8d34292..0c7ec876 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -325,7 +325,7 @@ void tst_QLowEnergyController::tst_connect() QVERIFY(serviceFoundSpy.size() >= foundServices.size()); QVERIFY(!serviceFoundSpy.isEmpty()); QList<QBluetoothUuid> listing; - for (int i = 0; i < serviceFoundSpy.count(); i++) { + for (qsizetype i = 0; i < serviceFoundSpy.size(); ++i) { const QVariant v = serviceFoundSpy[i].at(0); listing.append(v.value<QBluetoothUuid>()); } @@ -393,10 +393,10 @@ void tst_QLowEnergyController::tst_connect() //after disconnect all related characteristics and descriptors are invalid QList<QLowEnergyCharacteristic> chars = entry->characteristics(); - for (int i = 0; i < chars.count(); i++) { + for (qsizetype i = 0; i < chars.size(); ++i) { QCOMPARE(chars.at(i).isValid(), false); QList<QLowEnergyDescriptor> descriptors = chars[i].descriptors(); - for (int j = 0; j < descriptors.count(); j++) + for (qsizetype j = 0; j < descriptors.size(); ++j) QCOMPARE(descriptors[j].isValid(), false); } } @@ -588,12 +588,12 @@ void tst_QLowEnergyController::tst_concurrentDiscovery() verifyServiceProperties(services_second[i]); //after disconnect all related characteristics and descriptors are invalid const QList<QLowEnergyCharacteristic> chars = services[i]->characteristics(); - for (int j = 0; j < chars.count(); j++) { + for (qsizetype j = 0; j < chars.size(); ++j) { QCOMPARE(chars.at(j).isValid(), false); QVERIFY(services[i]->contains(chars[j])); QVERIFY(!services_second[i]->contains(chars[j])); const QList<QLowEnergyDescriptor> descriptors = chars[j].descriptors(); - for (int k = 0; k < descriptors.count(); k++) { + for (qsizetype k = 0; k < descriptors.size(); ++k) { QCOMPARE(descriptors[k].isValid(), false); services[i]->contains(descriptors[k]); QVERIFY(!services_second[i]->contains(chars[j])); @@ -1681,7 +1681,7 @@ void tst_QLowEnergyController::tst_writeCharacteristic() QLowEnergyCharacteristic dataChar; QLowEnergyCharacteristic configChar; - for (int i = 0; i < chars.count(); i++) { + for (qsizetype i = 0; i < chars.size(); ++i) { if (chars[i].uuid() == QBluetoothUuid(QString("f000aa61-0451-4000-b000-000000000000"))) dataChar = chars[i]; else if (chars[i].uuid() == QBluetoothUuid(QString("f000aa62-0451-4000-b000-000000000000"))) @@ -1933,7 +1933,7 @@ void tst_QLowEnergyController::tst_readWriteDescriptor() QCOMPARE(writtenValue, QByteArray::fromHex("01")); QList<QVariant> entry; - for (int i = 0; i < charChangedSpy.count(); i++) { + for (qsizetype i = 0; i < charChangedSpy.size(); ++i) { entry = charChangedSpy[i]; const QLowEnergyCharacteristic ch = entry[0].value<QLowEnergyCharacteristic>(); @@ -2001,7 +2001,7 @@ void tst_QLowEnergyController::tst_readWriteDescriptor() QTRY_VERIFY_WITH_TIMEOUT(descWrittenSpy.size() == 4, 10000); QCOMPARE(notification.value(), QByteArray::fromHex("0000")); - for (int i = 0; i < descWrittenSpy.count(); i++) { + for (qsizetype i = 0; i < descWrittenSpy.size(); ++i) { firstSignalData = descWrittenSpy.at(i); signalDesc = firstSignalData[0].value<QLowEnergyDescriptor>(); signalValue = firstSignalData[1].toByteArray(); diff --git a/tests/auto/qndefmessage/tst_qndefmessage.cpp b/tests/auto/qndefmessage/tst_qndefmessage.cpp index 78bef726..6ed6ffae 100644 --- a/tests/auto/qndefmessage/tst_qndefmessage.cpp +++ b/tests/auto/qndefmessage/tst_qndefmessage.cpp @@ -516,7 +516,7 @@ void tst_QNdefMessage::parseSingleRecordMessage() QVERIFY(message == reparsedMessage); QVERIFY(reparsedMessage == message); - for (int i = 0; i < message.count(); ++i) { + for (qsizetype i = 0; i < message.size(); ++i) { const QNdefRecord &record = message.at(i); const QNdefRecord &parsedRecord = parsedMessage.at(i); diff --git a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp index 73d6dc06..9513622b 100644 --- a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp +++ b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp @@ -407,7 +407,7 @@ void tst_QNearFieldTagType1::ndefMessages() } QList<QNdefMessage> ndefMessages; - for (int i = 0; i < ndefMessageReadSpy.count(); ++i) + for (qsizetype i = 0; i < ndefMessageReadSpy.size(); ++i) ndefMessages.append(ndefMessageReadSpy.at(i).first().value<QNdefMessage>()); QList<QNdefMessage> messages; @@ -463,7 +463,7 @@ void tst_QNearFieldTagType1::ndefMessages() } QList<QNdefMessage> storedMessages; - for (int i = 0; i < ndefMessageReadSpy.count(); ++i) + for (qsizetype i = 0; i < ndefMessageReadSpy.size(); ++i) storedMessages.append(ndefMessageReadSpy.at(i).first().value<QNdefMessage>()); QVERIFY(ndefMessages != storedMessages); diff --git a/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp b/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp index ec514cf7..e457a8aa 100644 --- a/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp +++ b/tests/auto/qnearfieldtagtype2/tst_qnearfieldtagtype2.cpp @@ -298,7 +298,7 @@ void tst_QNearFieldTagType2::ndefMessages() QTRY_VERIFY(!ndefMessageReadSpy.isEmpty()); QList<QNdefMessage> ndefMessages; - for (int i = 0; i < ndefMessageReadSpy.count(); ++i) + for (qsizetype i = 0; i < ndefMessageReadSpy.size(); ++i) ndefMessages.append(ndefMessageReadSpy.at(i).first().value<QNdefMessage>()); QList<QNdefMessage> messages; @@ -335,7 +335,7 @@ void tst_QNearFieldTagType2::ndefMessages() QTRY_VERIFY(!ndefMessageReadSpy.isEmpty()); QList<QNdefMessage> storedMessages; - for (int i = 0; i < ndefMessageReadSpy.count(); ++i) + for (qsizetype i = 0; i < ndefMessageReadSpy.size(); ++i) storedMessages.append(ndefMessageReadSpy.at(i).first().value<QNdefMessage>()); QVERIFY(ndefMessages != storedMessages); diff --git a/tests/bluetoothtestdevice/bluetoothtestdevice.cpp b/tests/bluetoothtestdevice/bluetoothtestdevice.cpp index 7734dab6..bb23deac 100644 --- a/tests/bluetoothtestdevice/bluetoothtestdevice.cpp +++ b/tests/bluetoothtestdevice/bluetoothtestdevice.cpp @@ -318,7 +318,7 @@ int main(int argc, char *argv[]) auto reconnect = [&connectioncount, &leController, advertisingData, &services, serviceDefinitions]() { connectioncount++; - for (int i = 0; i < services.size(); ++i) { + for (qsizetype i = 0; i < services.size(); ++i) { services[i].reset(leController->addService(serviceDefinitions[i])); } diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 29289d3f..da677e70 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -169,7 +169,7 @@ void BtLocalDevice::requestPairingUpdate(bool isPairing) localDevice->requestPairing(baddr, QBluetoothLocalDevice::Unpaired); } - for (int i = 0; i < foundTestServers.count(); i++) { + for (qsizetype i = 0; i < foundTestServers.size(); ++i) { if (isPairing) localDevice->requestPairing(foundTestServers.at(i).device().address(), QBluetoothLocalDevice::Paired); |