ladybird/Userland/Libraries/LibConfig
Sam Atkins 5bcb3e2f16 LibConfig+ConfigServer: Add permissive mode
When in permissive mode, the ConfigServer will not treat reads and
writes to non-pledged domains as errors, but instead turns them into
no-ops: Reads will act as if the key was not found, and writes will do
nothing. Permissive mode must be enabled before pledging any domains.

This is needed to make GUI Widgets nicer to work with in GML Playground:
a few Widgets include reads and writes to LibConfig in order to load
system settings (eg, GUI::Calendar) or to save and restore state
(eg, GUI::DynamicWidgetContainer). Without this change, editing a
layout that includes one of these Widgets will cause GML Playground to
crash when they try to access config domains that are not pledged.

The solution used previously is to make Playground pledge more domains,
but not only does this mean Playground has to know about these cases,
but also that working on a layout file can alter the user's settings in
other arbitrary apps, which is not something we want.

By simply ignoring these config accesses, we avoid those downsides, and
Widgets will simply use the fallback values they already have to provide
to Config::read_foo_value().
2024-03-07 17:49:01 -05:00
..
Client.cpp LibConfig+ConfigServer: Add permissive mode 2024-03-07 17:49:01 -05:00
Client.h LibConfig+ConfigServer: Add permissive mode 2024-03-07 17:49:01 -05:00
CMakeLists.txt Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
Listener.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Listener.h Userland: Convert config listener callbacks to use StringView 2023-06-27 15:37:00 +01:00