config::ui::SettingsStore
One level of a schema, stored in app::Settings.
| Declared in | src/libs/libconfigui/configui/SettingsStore.hpp |
| Inherits | QObject and config::IStore |
Detailed description
Every app-level value goes through `app::Settings` (settings-compliance §SPC). The store is generalized from Construct's `AppSeedStore` and obeys four facts about `app::Settings` (config-ui §CFGM-6):
- Writes happen on the thread that owns the settings object, because its sync timer is a member.
- `customSettingChanged` fires on every write with no compare, so the store compares before it reports a change.
- `customSettingChanged` does not fire on a remove. A remove through the store is reported by the resolver that made it.
- A setting flagged RestartRequired is written durably, so a crash before the restart keeps it.
The INI back end returns strings. get() converts each value to the type of its default, as `AppSeedStore` did, and the resolver then validates.
A `Color` value is stored as its name: `#rrggbb`, or `#aarrggbb` when the color is not opaque. A QColor written as a variant is `@Variant(...)` binary text in the INI file, which no one can read or edit, and the RTS lobby wrote the same keys as names. get() gives a QColor back for a name and for an old `@Variant` value.