From f7754f2bb3db666e4bfb2b82af079828e0086b84 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sun, 19 Sep 2021 20:02:50 +0200 Subject: Create utility method for moving entries from one group to another This will become especially useful when moving state data from the config file to a dedicated state data file. Task: https://phabricator.kde.org/T12549 --- src/core/kconfiggroup.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/kconfiggroup.h') diff --git a/src/core/kconfiggroup.h b/src/core/kconfiggroup.h index 2584cb85..8a6243af 100644 --- a/src/core/kconfiggroup.h +++ b/src/core/kconfiggroup.h @@ -194,6 +194,14 @@ public: */ void reparent(KConfigBase *parent, WriteConfigFlags pFlags = Normal); + /** + * Moves the key-value pairs from one config group to the other. + * In case the entries do not exist the key is ignored. + * + * @since 5.88 + */ + void moveValuesTo(const QList &keys, KConfigGroup &other, WriteConfigFlags pFlags = Normal); + /** * Returns the group that this group belongs to * -- cgit v1.2.1