]> git.sur5r.net Git - minitube/blobdiff - src/global.h
Merge tag 'upstream/2.5.2'
[minitube] / src / global.h
index d2aad7a0c6571103cb1791934e7d3f5c2b0c3dd6..9306998752410e15f50b45c220ce72c70e42180b 100644 (file)
@@ -1,7 +1,30 @@
+/* $BEGIN_LICENSE
+
+This file is part of Minitube.
+Copyright 2009, Flavio Tordini <flavio.tordini@gmail.com>
+
+Minitube is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Minitube is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitube.  If not, see <http://www.gnu.org/licenses/>.
+
+$END_LICENSE */
+
 #ifndef GLOBAL_H
 #define GLOBAL_H
 
 #include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
 #include <QStringList>
 #include <QNetworkProxy>
 #include <QNetworkAccessManager>
@@ -9,6 +32,7 @@
 #include <cstdlib>
 #include "networkaccess.h"
 #include "diskcache.h"
+#include "compatibility/pathsservice.h"
 
 namespace The {
 
@@ -125,9 +149,7 @@ namespace The {
             maybeSetSystemProxy();
             nam = new QNetworkAccessManager();
             QNetworkDiskCache *cache = new DiskCache();
-            QString cacheLocation = QDesktopServices::storageLocation(
-                        QDesktopServices::DataLocation);
-            cache->setCacheDirectory(cacheLocation);
+            cache->setCacheDirectory(Paths::getCacheLocation());
             nam->setCache(cache);
         }
         return nam;