From 35756f7a1b49f8d7aa603dd3bbe3c0a2c2d234a6 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Fri, 8 Jan 2021 15:34:54 +1100 Subject: cache: item expiry and max item size currently no total limit yet --- src/dialogs/settingsdialog.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/dialogs/settingsdialog.cpp') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index f18065f..0925578 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -250,6 +250,10 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->network_timeout->setValue(this->current_options.network_timeout); this->ui->enable_home_btn->setChecked(this->current_options.enable_home_btn); + + this->ui->cache_limit->setValue(this->current_options.cache_limit); + this->ui->cache_threshold->setValue(this->current_options.cache_threshold); + this->ui->cache_life->setValue(this->current_options.cache_life); } GenericSettings SettingsDialog::options() const @@ -660,8 +664,7 @@ void SettingsDialog::on_redirection_mode_currentIndexChanged(int index) this->current_options.redirection_policy = GenericSettings::RedirectionWarning(this->ui->redirection_mode->itemData(index).toInt()); } -void SettingsDialog::on_max_redirects_valueChanged(int max_redirections) -{ +void SettingsDialog::on_max_redirects_valueChanged(int max_redirections) { this->current_options.max_redirections = max_redirections; } @@ -674,3 +677,18 @@ void SettingsDialog::on_enable_home_btn_clicked(bool checked) { this->current_options.enable_home_btn = checked; } + +void SettingsDialog::on_cache_limit_valueChanged(int limit) +{ + this->current_options.cache_limit = limit; +} + +void SettingsDialog::on_cache_threshold_valueChanged(int thres) +{ + this->current_options.cache_threshold = thres; +} + +void SettingsDialog::on_cache_life_valueChanged(int life) +{ + this->current_options.cache_life = life; +} -- cgit v1.2.3