Commit 744bccf4 authored by David Redondo's avatar David Redondo 🏎
Browse files

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().
parent e309b83a
......@@ -579,6 +579,12 @@ void SensorFaceController::setFaceId(const QString &face)
d->faceConfigLoader = new KConfigLoader(cg, &file, this);
d->faceConfiguration = new KDeclarative::ConfigPropertyMap(d->faceConfigLoader, this);
connect(d->faceConfiguration, &KDeclarative::ConfigPropertyMap::valueChanged, this, [this] (const QString &key) {
auto item = d->faceConfigLoader->findItemByName(key);
if (item) {
d->appearanceGroup.writeEntry("chartFace", face);
Supports Markdown
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