diff options
author | Cygnix Proto <99915288+CygnixProto@users.noreply.github.com> | 2022-12-06 16:26:13 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-14 18:25:28 +0000 |
commit | 806a55eda1d2e76c52fcea2ef11b81f2967b6e74 (patch) | |
tree | 21533574a8c71ac1a5af844319d2a0b1f8a853d3 /Userland/Utilities/headless-browser.cpp | |
parent | bdd9bc16ded4c55e5e479b2b2357afc99ce65da8 (diff) | |
download | serenity-806a55eda1d2e76c52fcea2ef11b81f2967b6e74.zip |
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.
Diffstat (limited to 'Userland/Utilities/headless-browser.cpp')
-rw-r--r-- | Userland/Utilities/headless-browser.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index c1aaa5c869..2e8d2df8a3 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -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)); |