[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kio] src/widgets: Correctly save previews.
From: Maarten De Meyer <de.meyer.maarten () gmail ! com>
Date: 2014-08-23 14:51:45
Message-ID: E1XLCfR-0003i8-AE () scm ! kde ! org
[Download RAW message or body]
Git commit c49f2ad12f81883de450bf831c2206b448fa8d94 by Maarten De Meyer.
Committed on 23/08/2014 at 14:13.
Pushed by demeyer into branch 'master'.
Correctly save previews.
Save thumbnails in correct location and with a unique name.
REVIEW: 119907
M +2 -2 src/widgets/previewjob.cpp
http://commits.kde.org/kio/c49f2ad12f81883de450bf831c2206b448fa8d94
diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
index c65d683..55a3fb7 100644
--- a/src/widgets/previewjob.cpp
+++ b/src/widgets/previewjob.cpp
@@ -83,7 +83,7 @@ public:
shmaddr(0)
{
// http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#DIRECTORY
- thumbRoot = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) \
+ QLatin1String("/thumbnails/"); + thumbRoot = \
QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + \
QLatin1String("/thumbnails/"); }
enum { STATE_STATORIG, // if the thumbnail exists
@@ -679,7 +679,7 @@ void PreviewJobPrivate::slotThumbData(KIO::Job *, const \
QByteArray &data) signature.append(" (v" + thumbnailerVersion + ')');
}
thumb.setText("Software", signature);
- QSaveFile saveFile(thumbPath + "kde-tmp-XXXXXX.png");
+ QSaveFile saveFile(thumbPath + thumbName);
if (saveFile.open(QIODevice::WriteOnly)) {
if (thumb.save(&saveFile, "PNG")) {
saveFile.commit();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic