]> git.sur5r.net Git - minitube/blobdiff - src/global.h
Imported Upstream version 2.5.1
[minitube] / src / global.h
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;