]> git.sur5r.net Git - minitube/blobdiff - src/global.h
Imported Upstream version 2.3
[minitube] / src / global.h
index 6057a83a56e97a033ade4fac2dd9b352944feff1..e54b5d5e3e784735be6690b4ee08094d83a1509d 100644 (file)
@@ -22,6 +22,9 @@ $END_LICENSE */
 #define GLOBAL_H
 
 #include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
 #include <QStringList>
 #include <QNetworkProxy>
 #include <QNetworkAccessManager>
@@ -145,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);
         }