1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Preferences: Store default site settings values

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-01-31 22:00:43 +01:00
parent 070e8374b0
commit cbd3b9fb96
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
2 changed files with 10 additions and 1 deletions

View File

@ -277,7 +277,7 @@ SiteSettingsManager::Permission SiteSettingsManager::getDefaultPermission(const
return Deny;
}
return testAttribute(attribute);
return defaultAttributes[attribute];
}
void SiteSettingsManager::setDefaultPermission(const SiteSettingsManager::PageOptions& option, const int& value)

View File

@ -1094,11 +1094,20 @@ void Preferences::saveSettings()
settings.setValue(QSL("Password"), ui->proxyPassword->text());
settings.endGroup();
//SiteSettings
settings.beginGroup(QSL("Site-Settings"));
for (int i = 0; i < ui->siteSettingsList->count(); ++i) {
auto *item = static_cast<SiteInfoPermissionDefaultItem*>(ui->siteSettingsList->itemWidget(ui->siteSettingsList->item(i)));
settings.setValue(item->sqlColumn(), item->permission());
}
settings.endGroup();
ProfileManager::setStartingProfile(ui->startProfile->currentText());
m_pluginsList->save();
m_themesManager->save();
mApp->cookieJar()->loadSettings();
mApp->siteSettingsManager()->loadSettings();
mApp->history()->loadSettings();
mApp->reloadSettings();
mApp->desktopNotifications()->loadSettings();