]> git.sur5r.net Git - minitube/commitdiff
use standard cache location
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 3 Aug 2015 12:20:56 +0000 (14:20 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 3 Aug 2015 12:20:56 +0000 (14:20 +0200)
src/global.h
src/ytchannel.cpp

index e54b5d5e3e784735be6690b4ee08094d83a1509d..9306998752410e15f50b45c220ce72c70e42180b 100644 (file)
@@ -32,6 +32,7 @@ $END_LICENSE */
 #include <cstdlib>
 #include "networkaccess.h"
 #include "diskcache.h"
+#include "compatibility/pathsservice.h"
 
 namespace The {
 
@@ -148,12 +149,7 @@ namespace The {
             maybeSetSystemProxy();
             nam = new QNetworkAccessManager();
             QNetworkDiskCache *cache = new DiskCache();
-#if QT_VERSION >= 0x050000
-            QString cacheLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/qt5";
-#else
-            QString cacheLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
-#endif
-            cache->setCacheDirectory(cacheLocation);
+            cache->setCacheDirectory(Paths::getCacheLocation());
             nam->setCache(cache);
         }
         return nam;
index cd5531cb927f737022f7dacb89b5477915e132a4..c2b33aae4ad38fbfea32210e4f25a00622a316f8 100644 (file)
@@ -191,7 +191,7 @@ void YTChannel::loadThumbnail() {
 }
 
 const QString & YTChannel::getThumbnailDir() {
-    static const QString thumbDir = Paths::getDataLocation() + "/channels/";
+    static const QString thumbDir = Paths::getCacheLocation() + "/channels/";
     return thumbDir;
 }