[NetworkCache] Fix path for network cache

remotes/origin/falkon
nowrep 12 years ago
parent 34bb2a2097
commit 50e8bb071f
  1. 2
      src/lib/app/mainapplication.cpp
  2. 4
      src/lib/preferences/preferences.cpp

@ -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());

@ -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()));

Loading…
Cancel
Save