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:
parent
34bb2a2097
commit
50e8bb071f
@ -470,7 +470,7 @@ QNetworkDiskCache* MainApplication::networkCache()
|
|||||||
{
|
{
|
||||||
if (!m_networkCache) {
|
if (!m_networkCache) {
|
||||||
Settings settings;
|
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 basePath = settings.value("Web-Browser-Settings/CachePath", defaultBasePath).toString();
|
||||||
const QString cachePath = QString("%1/%2-Qt%3/").arg(basePath, qWebKitVersion(), qVersion());
|
const QString cachePath = QString("%1/%2-Qt%3/").arg(basePath, qWebKitVersion(), qVersion());
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
#include <QNetworkDiskCache>
|
||||||
|
|
||||||
static QString createLanguageItem(const QString &lang)
|
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->allowCache->setChecked(settings.value("AllowLocalCache", true).toBool());
|
||||||
ui->cacheMB->setValue(settings.value("LocalCacheSize", 50).toInt());
|
ui->cacheMB->setValue(settings.value("LocalCacheSize", 50).toInt());
|
||||||
ui->MBlabel->setText(settings.value("LocalCacheSize", 50).toString() + " MB");
|
ui->MBlabel->setText(settings.value("LocalCacheSize", 50).toString() + " MB");
|
||||||
// FIXME: !!!
|
ui->cachePath->setText(settings.value("CachePath", mApp->networkCache()->cacheDirectory()).toString());
|
||||||
ui->cachePath->setText(settings.value("CachePath", QString("%1networkcache/").arg(DataPaths::currentProfilePath())).toString());
|
|
||||||
connect(ui->allowCache, SIGNAL(clicked(bool)), this, SLOT(allowCacheChanged(bool)));
|
connect(ui->allowCache, SIGNAL(clicked(bool)), this, SLOT(allowCacheChanged(bool)));
|
||||||
connect(ui->cacheMB, SIGNAL(valueChanged(int)), this, SLOT(cacheValueChanged(int)));
|
connect(ui->cacheMB, SIGNAL(valueChanged(int)), this, SLOT(cacheValueChanged(int)));
|
||||||
connect(ui->changeCachePath, SIGNAL(clicked()), this, SLOT(changeCachePathClicked()));
|
connect(ui->changeCachePath, SIGNAL(clicked()), this, SLOT(changeCachePathClicked()));
|
||||||
|
Loading…
Reference in New Issue
Block a user