diff options
author | Alexander Lohnau <alexander.lohnau@gmx.de> | 2021-09-19 20:02:50 +0200 |
---|---|---|
committer | Alexander Lohnau <alexander.lohnau@gmx.de> | 2021-10-11 18:11:27 +0200 |
commit | f7754f2bb3db666e4bfb2b82af079828e0086b84 (patch) | |
tree | db1120cab3fb234b0c4d9f55f626a93968ac3fa1 /src/core/kconfiggroup.h | |
parent | 13b79463dd80c84c7cf1c817c363e7747e4da034 (diff) | |
download | kconfig-f7754f2bb3db666e4bfb2b82af079828e0086b84.tar.gz kconfig-f7754f2bb3db666e4bfb2b82af079828e0086b84.tar.bz2 |
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
Diffstat (limited to 'src/core/kconfiggroup.h')
-rw-r--r-- | src/core/kconfiggroup.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -195,6 +195,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<const char *> &keys, KConfigGroup &other, WriteConfigFlags pFlags = Normal); + + /** * Returns the group that this group belongs to * * @return the parent group, or an invalid group if this is a top-level |