clean: deprecated QCryptographicHash::addData

This commit is contained in:
shenleban tongying 2024-10-06 17:11:11 -04:00
parent 90d55d7392
commit 94ea6c570c

View file

@ -516,7 +516,8 @@ string makeDictionaryId( vector< string > const & dictionaryFiles ) noexcept
QCryptographicHash hash( QCryptographicHash::Md5 ); QCryptographicHash hash( QCryptographicHash::Md5 );
for ( const auto & i : sortedList ) { 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(); return hash.result().toHex().data();