Commit cf77c8ce authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

SensorFaceController: Save on destruction if the face requests it

This adds a property "ForceSaveOnDestroy" to the faceproperties file
that, if set, means SensorFaceController will save when destroyed, even
if "shouldSync" is set to false. This fixes issues where certain faces
would use face configuration for properties that change outside of an
"edit" mode.

BUG: 433768
BUG: 433536
BUG: 434005


(cherry picked from commit dc7a175d)
parent 7731fe41
......@@ -386,7 +386,8 @@ SensorFaceController::SensorFaceController(KConfigGroup &config, QQmlEngine *eng
SensorFaceController::~SensorFaceController()
{
if (!d->shouldSync) {
auto forceSave = d->faceProperties.readEntry(QStringLiteral("ForceSaveOnDestroy"), false);
if (!d->shouldSync && !forceSave) {
// If we should not sync automatically, clear all changes before we
// destroy the config objects, otherwise they will be written during
// destruction.
......
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