Warning, /frameworks/kconfig/docs/options.md is written in an unsupported language. File is not indexed.

0001 KConfig Entry Options            {#options}
0002 =====================
0003 
0004 KConfig provides various options that can alter how it interprets configuration
0005 entries on a per-entry, per-group or per-file basis.  Note that these are not
0006 supported by other configuration frameworks, and so should not be used in files
0007 that are intended to be used by applications that do not use KConfig (such as
0008 application desktop files).
0009 
0010 
0011 Immutable Entries
0012 -----------------
0013 
0014 KConfig's cascading configuration mechanism usually causes values from earlier,
0015 "global" configuration files to be overridden by later, "local" ones.
0016 Typically, the system administrator might set global defaults, and a user might
0017 override them in their local configuration files.
0018 
0019 However, KConfig provides a way to lock down configuration values, so that the
0020 global settings override the local ones.  This allows system administrators to
0021 restrict the values a user can set for an entry, group of entries or an entire
0022 configuration file.
0023 
0024 This is important for Kiosk authorization (see the KAuthorized namespace),
0025 which allows parts of the user interface to be locked down.
0026 
0027 Configuration entries can be marked as immutable with the `$i` option.  This can
0028 be done on a per-entry basis:
0029 
0030     [MyGroup]
0031     someKey[$i]=42
0032 
0033 on a per-group basis (which will prevent any attempts to modify entries in the
0034 group at all in later files):
0035 
0036     [MyGroup][$i]
0037     someKey=42
0038 
0039 or for an entire file by putting `[$i]` at the start of the file:
0040 
0041     [$i]
0042     [MyGroup]
0043     someKey=42
0044     [MyOtherGroup]
0045     someOtherKey=11
0046 
0047 Once this is done, the immutable entries or groups cannot be overridden by later
0048 files of the same name (and, if the file is immutable, later files will be
0049 ignored entirely).
0050 
0051 Note that a similar effect to file immutability can be achieved by using file
0052 system permissions to prevent the user from writing to their local versions of
0053 the configuration file, although (since this is normally a setup error), the
0054 user will be warned that the configuration file is not writable.  This warning
0055 can be suppressed by adding the following setting to either the relevant
0056 configuration file or the `kdeglobals` file:
0057 
0058     [General]
0059     warn_unwritable_config=true
0060 
0061 However, using file system permissions like this can potentially be circumvented
0062 by the user if they have write access to the containing directory or can modify
0063 environment variables (and `XDG_CONFIG_HOME` in particular).
0064 
0065 
0066 
0067 Shell Expansion
0068 ---------------
0069 
0070 If an entry is marked with `$e`, environment variables will be expanded.
0071 
0072     Name[$e]=$USER
0073 
0074 When the "Name" entry is read `$USER` will be replaced with the value of the
0075 `$USER` environment variable.
0076 
0077 Note that the application will replace `$USER` with its
0078 expanded value after saving. To prevent this combine the `$e` option
0079 with `$i` (immmutable) option.  For example:
0080 
0081     Name[$ei]=$USER
0082 
0083 This will make that the "Name" entry will always return the value of the `$USER`
0084 environment variable. The user will not be able to change this entry.
0085 
0086 The following syntax for environment variables is also supported:
0087 
0088     Name[$ei]=${USER}
0089 
0090 There are three environment variables that have a fallback strategy if the
0091 environment variable is not set. They instead map to a location from QStandardPaths.
0092 They are:
0093 
0094 * `$QT_CACHE_HOME` - QStandardPaths::GenericCacheLocation
0095 * `$QT_CONFIG_HOME` - QStandardPaths::GenericConfigLocation
0096 * `$QT_DATA_HOME` - QStandardPaths::GenericDataLocation