changed settings paths

This commit is contained in:
fourtf
2018-06-21 13:02:34 +02:00
parent e0ecd97184
commit 2f91e3097a
17 changed files with 158 additions and 94 deletions
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include <QDir>
#include <QString>
namespace chatterino {
namespace util {
// https://stackoverflow.com/a/13014491
static QString combinePath(const QString &a, const QString &b)
{
return QDir::cleanPath(a + QDir::separator() + b);
}
} // namespace util
} // namespace chatterino
+1 -1
View File
@@ -30,7 +30,7 @@ void NetworkRequest::Data::writeToCache(const QByteArray &bytes)
if (this->useQuickLoadCache) {
auto app = getApp();
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->getHash());
QFile cachedFile(app->paths->cacheDirectory + "/" + this->getHash());
if (cachedFile.open(QIODevice::WriteOnly)) {
cachedFile.write(bytes);
+2 -2
View File
@@ -183,7 +183,7 @@ public:
if (this->data.useQuickLoadCache) {
auto app = getApp();
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->data.getHash());
QFile cachedFile(app->paths->cacheDirectory + "/" + this->data.getHash());
if (cachedFile.exists()) {
if (cachedFile.open(QIODevice::ReadOnly)) {
@@ -329,7 +329,7 @@ private:
if (this->data.useQuickLoadCache) {
auto app = getApp();
QFile cachedFile(app->paths->cacheFolderPath + "/" + this->data.getHash());
QFile cachedFile(app->paths->cacheDirectory + "/" + this->data.getHash());
if (cachedFile.exists()) {
if (cachedFile.open(QIODevice::ReadOnly)) {