Commit 984148d3 authored by David Redondo's avatar David Redondo 🏎

Write entries if face config changes

If we should not sync we correctly disable autosave. This disables writing to
the config and syncing it. However we still want to write to the config even
if the config should not be synced automatically, so when it is externally
synced the values are saved. This is the same method uses for the other config
properties, for example compare with setTitle().
BUG:429155
BUG:429167
BUG:429367


(cherry picked from commit 744bccf4)
parent 0eb3e56e
......@@ -484,6 +484,12 @@ void SensorFaceController::setFaceId(const QString &face)
d->faceConfigLoader = new KConfigLoader(cg, &file, this);
d->faceConfiguration = new KDeclarative::ConfigPropertyMap(d->faceConfigLoader, this);
d->faceConfiguration->setAutosave(d->shouldSync);
connect(d->faceConfiguration, &KDeclarative::ConfigPropertyMap::valueChanged, this, [this] (const QString &key) {
auto item = d->faceConfigLoader->findItemByName(key);
if (item) {
item->writeConfig(d->faceConfigLoader->config());
}
});
}
d->appearanceGroup.writeEntry("chartFace", face);
......
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