From 0078391c18fd93dfc52075a780ff308a18993fb6 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 11 Sep 2020 13:50:48 +0200 Subject: Fix warnings coming from using the deprecated overload of qCheckSum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I719c2d56a690fd245d3917045de4005f118c688b Reviewed-by: Sona Kurazyan Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Eirik Aavitsland --- tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp | 4 ++-- tests/auto/other/lancelot/tst_lancelot.cpp | 2 +- 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(checksum)); + QCOMPARE(::qChecksum(QByteArrayView(data.constData(), len)), static_cast(checksum)); } - QCOMPARE(::qChecksum(data.constData(), len, standard), static_cast(checksum)); + QCOMPARE(::qChecksum(QByteArrayView(data.constData(), len), standard), static_cast(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)); } } -- cgit v1.2.3