diff options
author | Méven Car <meven29@gmail.com> | 2020-03-05 10:02:46 +0100 |
---|---|---|
committer | Méven Car <meven.car@enioka.com> | 2020-03-08 19:02:19 +0100 |
commit | ec207330d5bd61799a47092bf555a523ab000f93 (patch) | |
tree | 1d81fd6d70ff14dcad535cc79c8d40c641a1c676 /src/core/kcoreconfigskeleton.h | |
parent | a38f3d91d9dc6717010f01893ae26c8015b6bb05 (diff) | |
download | kconfig-ec207330d5bd61799a47092bf555a523ab000f93.tar.gz kconfig-ec207330d5bd61799a47092bf555a523ab000f93.tar.bz2 |
KconfigXT: Add a value attribute to Enum field choices
Summary:
Allow to write choices such as :
```
<choices>
<choice name="enum_name" value="I can't containt (anything)"></choice>
<choice name="normal_choice"></choice>
</choices>
```
Test Plan: ctest
Reviewers: ervin, bport, crossi, #frameworks
Reviewed By: ervin
Subscribers: ngraham, davidre, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27463
Diffstat (limited to 'src/core/kcoreconfigskeleton.h')
-rw-r--r-- | src/core/kcoreconfigskeleton.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/kcoreconfigskeleton.h b/src/core/kcoreconfigskeleton.h index 02473fb4..9d84583e 100644 --- a/src/core/kcoreconfigskeleton.h +++ b/src/core/kcoreconfigskeleton.h @@ -802,9 +802,20 @@ public: void writeConfig(KConfig *config) override; // Source compatibility with 4.x + // TODO KF6 remove typedef Choice Choice2; QList<Choice> choices2() const; + /** + * Returns the value for for the choice with the given name + */ + QString valueForChoice(const QString &name) const; + + /** + * Stores a choice value for name + */ + void setValueForChoice(const QString &name, const QString &valueForChoice); + private: QList<Choice> mChoices; }; |