From 1e142354c94549bb97cc815a1d2585043fff64ba Mon Sep 17 00:00:00 2001 From: Michael Nutt Date: Tue, 9 Jul 2024 10:17:17 +0900 Subject: [PATCH] Switch back to QByteArray for old qt6 version in ci --- Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp b/Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp index f23965216f157..d63274a0e4717 100644 --- a/Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp +++ b/Source/WebCore/PAL/pal/crypto/qt/CryptoDigestQt.cpp @@ -79,7 +79,7 @@ std::unique_ptr CryptoDigest::create(CryptoDigest::Algorithm algor void CryptoDigest::addBytes(std::span input) { - m_context->hash.addData(QByteArrayView(input.data(), input.size())); + m_context->hash.addData(QByteArray(reinterpret_cast(input.data()), static_cast(input.size()))); } Vector CryptoDigest::computeHash() @@ -92,7 +92,7 @@ Vector CryptoDigest::computeHash() std::optional> CryptoDigest::computeHash(Algorithm algorithm, const Vector& input, UseCryptoKit) { QCryptographicHash hash(toQtAlgorithm(algorithm)); - hash.addData(QByteArrayView(input.span().data(), input.span().size())); + hash.addData(QByteArray(reinterpret_cast(input.span().data()), static_cast(input.span().size()))); QByteArray digest = hash.result(); return Vector(std::span { reinterpret_cast(digest.constData()), static_cast(digest.size()) });