clean: remaning deprecated QCryptographicHash::addData usages

This commit is contained in:
shenleban tongying 2024-11-07 02:05:54 -05:00 committed by GitHub
parent 618310f772
commit c864a9a897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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
}