From 0fb134230ecd61735eb788f44de93a30a164aeec Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Mon, 3 Aug 2015 14:20:56 +0200 Subject: [PATCH] use standard cache location --- src/global.h | 8 ++------ src/ytchannel.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/global.h b/src/global.h index e54b5d5..9306998 100644 --- a/src/global.h +++ b/src/global.h @@ -32,6 +32,7 @@ $END_LICENSE */ #include #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; diff --git a/src/ytchannel.cpp b/src/ytchannel.cpp index cd5531c..c2b33aa 100644 --- a/src/ytchannel.cpp +++ b/src/ytchannel.cpp @@ -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; } -- 2.39.5