summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-04-05 10:43:37 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-04-06 12:44:40 +0200
commit0c1f9ab36b2611066cb5d08472d9a812ac7e4014 (patch)
tree029b74fa06369c36a7045e2a5074b1f21a8c2c8f /tests/benchmarks
parentbf2bff543c20f46271152c8eeddc0050bb61c143 (diff)
benchmarks: fix deprecation warnings
- count() -> size() - QCryptographicHash::addData(ptr, ch) -> ({ptr, ch}) (QByteArrayView overload) Pick-to: 6.3 Change-Id: I15dddfa5c4385dd2a0fa0c3ae06c303c7151e2dc Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp4
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp b/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp
index bff3ddbc26..42c214b1e9 100644
--- a/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp
+++ b/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp
@@ -176,8 +176,8 @@ void tst_QCryptographicHash::addDataChunked()
// add the data in chunks of 64 bytes
for (int i = 0; i < data.size() / 64; ++i)
- hash.addData(data.constData() + 64 * i, 64);
- hash.addData(data.constData() + data.size() / 64 * 64, data.size() % 64);
+ hash.addData({data.constData() + 64 * i, 64});
+ hash.addData({data.constData() + data.size() / 64 * 64, data.size() % 64});
hash.result();
}
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index ef88f64d8f..d98c2712e5 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -122,10 +122,10 @@ void tst_QText::shaping_data()
QFile file(testFile);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
- QVERIFY(data.count() > 1000);
+ QVERIFY(data.size() > 1000);
QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), Qt::SkipEmptyParts);
- QVERIFY(list.count() %2 == 0); // even amount as we have title and then content.
- for (int i=0; i < list.count(); i+=2) {
+ QVERIFY(list.size() % 2 == 0); // even amount as we have title and then content.
+ for (int i = 0; i < list.size(); i += 2) {
QTest::newRow(list.at(i).toLatin1()) << list.at(i+1);
}
}