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/kconfig_compiler/README.dox | |
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/kconfig_compiler/README.dox')
-rw-r--r-- | src/kconfig_compiler/README.dox | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/kconfig_compiler/README.dox b/src/kconfig_compiler/README.dox index c17bd395..55e59736 100644 --- a/src/kconfig_compiler/README.dox +++ b/src/kconfig_compiler/README.dox @@ -354,7 +354,7 @@ this allows the same Enum value names to be used in different enums. For example <entry name="KeepData" type="Enum"> <choices> <choice name="Do"> - <choice name="Dont"> + <choice name="Dont" value="Don't"> </choices> </entry> \endverbatim @@ -369,6 +369,9 @@ will generate this public class containing the enum definition, inside the gener }; \endverbatim +Since 5.68, if present the <b>value</b> attribute will be used as the choice value written to the backend +instead of the <b>name</b>, allowing to write text incompatible with enum naming. + Alternatively, if <b>GlobalEnums</b> is set to true, all Enum items are defined as unnamed enums in the global scope of the generated class. In this case, all Enum values must have different names to avoid clashes. However, you can use a 'prefix' argument @@ -380,7 +383,7 @@ is set to true, the .kcfg entry <entry name="KeepData" type="Enum"> <choices prefix="Keep_"> <choice name="Do"> - <choice name="Dont"> + <choice name="Dont" value="Don't"> </choices> </entry> \endverbatim |