From c864a9a8974756224573e5e632b4c69032a2159c Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Thu, 7 Nov 2024 02:05:54 -0500 Subject: [PATCH] clean: remaning deprecated `QCryptographicHash::addData` usages --- src/dict/bgl.cc | 4 ++-- src/dict/mdx.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dict/bgl.cc b/src/dict/bgl.cc index 0dc1734b..57c209c7 100644 --- a/src/dict/bgl.cc +++ b/src/dict/bgl.cc @@ -721,8 +721,8 @@ void BglArticleRequest::run() string const & targetHeadword = displayedHeadword.size() ? displayedHeadword : headword; QCryptographicHash hash( QCryptographicHash::Md5 ); - hash.addData( targetHeadword.data(), targetHeadword.size() + 1 ); // with 0 - hash.addData( articleText.data(), articleText.size() ); + hash.addData( { targetHeadword.data(), static_cast< qsizetype >( targetHeadword.size() + 1 ) } ); // with 0 + hash.addData( { articleText.data(), static_cast< qsizetype >( articleText.size() ) } ); if ( !articleBodiesIncluded.insert( hash.result() ).second ) { continue; // Already had this body diff --git a/src/dict/mdx.cc b/src/dict/mdx.cc index 11b6a7db..aa374cca 100644 --- a/src/dict/mdx.cc +++ b/src/dict/mdx.cc @@ -621,7 +621,7 @@ void MdxArticleRequest::run() } QCryptographicHash hash( QCryptographicHash::Md5 ); - hash.addData( articleBody.data(), articleBody.size() ); + hash.addData( { articleBody.data(), static_cast< qsizetype >( articleBody.length() ) } ); if ( !articleBodiesIncluded.insert( hash.result() ).second ) { continue; // Already had this body }