Add ability to customize cache folder

Add an advanced settings page, currently only housing the "Cache" category

Fix #541
This commit is contained in:
Rasmus Karlsson
2018-08-19 16:20:14 +02:00
parent 3fc91bded5
commit a07255be2d
9 changed files with 133 additions and 14 deletions
+1 -4
View File
@@ -1,6 +1,5 @@
#include "common/NetworkData.hpp"
#include "Application.hpp"
#include "singletons/Paths.hpp"
#include "util/DebugCount.hpp"
@@ -42,9 +41,7 @@ QString NetworkData::getHash()
void NetworkData::writeToCache(const QByteArray &bytes)
{
if (this->useQuickLoadCache_) {
auto app = getApp();
QFile cachedFile(getPaths()->cacheDirectory + "/" + this->getHash());
QFile cachedFile(getPaths()->cacheDirectory() + "/" + this->getHash());
if (cachedFile.open(QIODevice::WriteOnly)) {
cachedFile.write(bytes);