mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kioslave: use hex string as hash for thumbnail
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c4c3f0533d
commit
97c5a38cf2
1 changed files with 2 additions and 2 deletions
|
@ -716,8 +716,8 @@ bool ThumbnailProtocol::createSubThumbnail(QImage& thumbnail, const QString& fil
|
|||
// 128 x 128 or 256 x 256 pixels
|
||||
int cacheSize = 0;
|
||||
// NOTE: make sure the algorithm matches the one used in kdelibs/kio/kio/previewjob.cpp
|
||||
const QByteArray hash = QCryptographicHash::hash(QFile::encodeName(fileName.url()), QCryptographicHash::Sha1);
|
||||
const QString thumbName = QFile::encodeName(hash.toHex()) + QLatin1String(".png");
|
||||
const QByteArray hash = QFile::encodeName(fileName.url()).toHex();
|
||||
const QString thumbName = hash + QLatin1String(".png");
|
||||
if (m_thumbBasePath.isEmpty()) {
|
||||
m_thumbBasePath = QDir::homePath() + "/.thumbnails/";
|
||||
KStandardDirs::makeDir(m_thumbBasePath + "normal/", 0700);
|
||||
|
|
Loading…
Add table
Reference in a new issue