Skip to content

Commit

Permalink
clean: remaning deprecated QCryptographicHash::addData usages
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying authored Nov 7, 2024
1 parent 618310f commit c864a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dict/bgl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/dict/mdx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c864a9a

Please sign in to comment.