mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kio: use SHA1 algorithm for thumbnail name
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b25acb7518
commit
54903318b2
1 changed files with 3 additions and 2 deletions
|
@ -507,8 +507,9 @@ bool PreviewJobPrivate::statResultThumbnail()
|
|||
url.setPass(QString());
|
||||
origName = url.url();
|
||||
|
||||
QByteArray md5 = QCryptographicHash::hash( QFile::encodeName( origName ), QCryptographicHash::Md5 );
|
||||
thumbName = QFile::encodeName( md5.toHex() ) + ".png";
|
||||
// NOTE: make sure the algorithm matches the one used in kde-workspace/kioslave/thumbnail/thumbnail.cpp
|
||||
const QByteArray hash = QCryptographicHash::hash( QFile::encodeName( origName ), QCryptographicHash::Sha1 );
|
||||
thumbName = QFile::encodeName( hash.toHex() ) + ".png";
|
||||
|
||||
QImage thumb;
|
||||
if ( !thumb.load( thumbPath + thumbName ) )
|
||||
|
|
Loading…
Add table
Reference in a new issue