]> git.sur5r.net Git - minitube/blobdiff - src/global.h
Qt5 fixes
[minitube] / src / global.h
index 5bac445df6845ca8ae104299ce4aeb570e4665ad..e54b5d5e3e784735be6690b4ee08094d83a1509d 100644 (file)
@@ -148,8 +148,11 @@ namespace The {
             maybeSetSystemProxy();
             nam = new QNetworkAccessManager();
             QNetworkDiskCache *cache = new DiskCache();
-            QString cacheLocation = QDesktopServices::storageLocation(
-                        QDesktopServices::DataLocation);
+#if QT_VERSION >= 0x050000
+            QString cacheLocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/qt5";
+#else
+            QString cacheLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+#endif
             cache->setCacheDirectory(cacheLocation);
             nam->setCache(cache);
         }