Commit b4a04aff authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[FontAASettings] Use KSharedConfig

This way we write to the same shared config instance as e.g. krdb and when we sync() it then also reads the current values.

CHANGELOG: Fixed font antialiasing and hinting settings not correctly saving

Differential Revision: https://phabricator.kde.org/D24562
parent 1c8a6c79
......@@ -204,8 +204,9 @@ void FontAASettings::load()
bool FontAASettings::save(KXftConfig::AntiAliasing::State aaState)
{
KXftConfig xft;
KConfig kglobals("kdeglobals", KConfig::NoGlobals);
KConfigGroup grp(&kglobals, "General");
KSharedConfig::Ptr config = KSharedConfig::openConfig("kdeglobals");
KConfigGroup grp(config, "General");
xft.setAntiAliasing(aaState);
if (m_state.exclude) {
......@@ -247,7 +248,7 @@ bool FontAASettings::save(KXftConfig::AntiAliasing::State aaState)
}
}
mod = true;
kglobals.sync();
config->sync();
if (!mod) {
mod = xft.changed();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment