From 828f52439fb02f224cc034e65dd82a0138a60662 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Tue, 1 Feb 2022 18:17:02 +0100 Subject: KConfigPropertyMap: Clean up internal leftovers of autosave feature This has should be done explicitely, as the docs explain. This causes issues for the KScreenLocker KCM port. --- src/qml/kconfigpropertymap.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/qml/kconfigpropertymap.cpp b/src/qml/kconfigpropertymap.cpp index 55b2991d..f31b09c7 100644 --- a/src/qml/kconfigpropertymap.cpp +++ b/src/qml/kconfigpropertymap.cpp @@ -34,7 +34,6 @@ public: KConfigPropertyMap *q; QPointer config; bool updatingConfigValue = false; - bool autosave = true; bool notify = false; }; @@ -122,11 +121,6 @@ void KConfigPropertyMapPrivate::writeConfig() item->setProperty(q->value(item->key())); } - if (autosave) { - updatingConfigValue = true; - config.data()->save(); - updatingConfigValue = false; - } } void KConfigPropertyMapPrivate::writeConfigValue(const QString &key, const QVariant &value) @@ -136,12 +130,6 @@ void KConfigPropertyMapPrivate::writeConfigValue(const QString &key, const QVari updatingConfigValue = true; item->setWriteFlags(notify ? KConfigBase::Notify : KConfigBase::Normal); item->setProperty(value); - if (autosave) { - config.data()->save(); - // why read? read will update KConfigSkeletonItem::mLoadedValue, - // allowing a write operation to be performed next time - config.data()->read(); - } updatingConfigValue = false; } } -- cgit v1.2.1