Skip to content

Commit

Permalink
clean: deprecated QCryptographicHash::addData
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Oct 6, 2024
1 parent 90d55d7 commit 94ea6c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dict/dictionary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ string makeDictionaryId( vector< string > const & dictionaryFiles ) noexcept
QCryptographicHash hash( QCryptographicHash::Md5 );

for ( const auto & i : sortedList ) {
hash.addData( i.c_str(), i.size() + 1 );
// Note: a null byte at the end is a must
hash.addData( { i.c_str(), static_cast< qsizetype >( i.size() + 1 ) } );
}

return hash.result().toHex().data();
Expand Down

0 comments on commit 94ea6c5

Please sign in to comment.