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>
This commit is contained in:
parent
bf2bff543c
commit
0c1f9ab36b
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user