#define GLOBAL_H
#include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
#include <QStringList>
#include <QNetworkProxy>
#include <QNetworkAccessManager>
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);
}