summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-09-11 13:50:48 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-11 19:32:34 +0200
commit0078391c18fd93dfc52075a780ff308a18993fb6 (patch)
tree28355f59a509527f7ae8006b710465569156dfbd /tests
parent199d86782075e6a4fff624784340c2d9d45c5297 (diff)
Fix warnings coming from using the deprecated overload of qCheckSum
Change-Id: I719c2d56a690fd245d3917045de4005f118c688b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp4
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index 6ac24d280d..2f0f5654ca 100644
--- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
@@ -235,9 +235,9 @@ void tst_QByteArray::qChecksum()
QCOMPARE(data.length(), int(len));
if (standard == Qt::ChecksumIso3309) {
- QCOMPARE(::qChecksum(data.constData(), len), static_cast<quint16>(checksum));
+ QCOMPARE(::qChecksum(QByteArrayView(data.constData(), len)), static_cast<quint16>(checksum));
}
- QCOMPARE(::qChecksum(data.constData(), len, standard), static_cast<quint16>(checksum));
+ QCOMPARE(::qChecksum(QByteArrayView(data.constData(), len), standard), static_cast<quint16>(checksum));
}
void tst_QByteArray::qCompress_data()
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index 7c0d809c01..1f0066eebb 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -130,7 +130,7 @@ void tst_Lancelot::initTestCase()
file.open(QFile::ReadOnly);
QByteArray cont = file.readAll();
scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), Qt::SkipEmptyParts));
- scriptChecksums.insert(fileName, qChecksum(cont.constData(), cont.size()));
+ scriptChecksums.insert(fileName, qChecksum(cont));
}
}