mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibGfx+Userland: Make Gfx::SystemTheme propagate errors
This patch introduces error propagation to Gfx::SystemTheme to remove instances of release_value_but_fixme_should_propagate_errors(). Userland applications that have been affected by this change have been updated to utilise this propagation and as a result 4 such instances of the aforementioned method have been removed.
This commit is contained in:
parent
bdd9bc16de
commit
806a55eda1
15 changed files with 64 additions and 39 deletions
|
@ -771,10 +771,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto page_client = HeadlessBrowserPageClient::create();
|
||||
|
||||
if (!resources_folder.is_empty())
|
||||
page_client->setup_palette(Gfx::load_system_theme(LexicalPath::join(resources_folder, "themes/Default.ini"sv).string()));
|
||||
else
|
||||
page_client->setup_palette(Gfx::load_system_theme("/res/themes/Default.ini"));
|
||||
if (!resources_folder.is_empty()) {
|
||||
auto system_theme = TRY(Gfx::load_system_theme(LexicalPath::join(resources_folder, "themes/Default.ini"sv).string()));
|
||||
page_client->setup_palette(system_theme);
|
||||
} else {
|
||||
auto system_theme = TRY(Gfx::load_system_theme("/res/themes/Default.ini"));
|
||||
page_client->setup_palette(system_theme);
|
||||
}
|
||||
|
||||
dbgln("Loading {}", url);
|
||||
page_client->load(AK::URL(url));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue