1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

[NetworkCache] Fix path for network cache

This commit is contained in:
nowrep 2014-03-13 12:53:19 +01:00
parent 34bb2a2097
commit 50e8bb071f
2 changed files with 3 additions and 3 deletions

View File

@ -470,7 +470,7 @@ QNetworkDiskCache* MainApplication::networkCache()
{
if (!m_networkCache) {
Settings settings;
const QString defaultBasePath = QString("%1networkcache/").arg(DataPaths::currentProfilePath());
const QString defaultBasePath = QString("%1/networkcache/").arg(DataPaths::currentProfilePath());
const QString basePath = settings.value("Web-Browser-Settings/CachePath", defaultBasePath).toString();
const QString cachePath = QString("%1/%2-Qt%3/").arg(basePath, qWebKitVersion(), qVersion());

View File

@ -57,6 +57,7 @@
#include <QCloseEvent>
#include <QColorDialog>
#include <QDesktopWidget>
#include <QNetworkDiskCache>
static QString createLanguageItem(const QString &lang)
{
@ -301,8 +302,7 @@ Preferences::Preferences(BrowserWindow* window, QWidget* parent)
ui->allowCache->setChecked(settings.value("AllowLocalCache", true).toBool());
ui->cacheMB->setValue(settings.value("LocalCacheSize", 50).toInt());
ui->MBlabel->setText(settings.value("LocalCacheSize", 50).toString() + " MB");
// FIXME: !!!
ui->cachePath->setText(settings.value("CachePath", QString("%1networkcache/").arg(DataPaths::currentProfilePath())).toString());
ui->cachePath->setText(settings.value("CachePath", mApp->networkCache()->cacheDirectory()).toString());
connect(ui->allowCache, SIGNAL(clicked(bool)), this, SLOT(allowCacheChanged(bool)));
connect(ui->cacheMB, SIGNAL(valueChanged(int)), this, SLOT(cacheValueChanged(int)));
connect(ui->changeCachePath, SIGNAL(clicked()), this, SLOT(changeCachePathClicked()));