mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +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
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/CygnixProto 🔰
Commit: 806a55eda1
Pull-request: https://github.com/SerenityOS/serenity/pull/16335
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
15 changed files with 64 additions and 39 deletions
|
@ -19,9 +19,11 @@ ThemePreviewWidget::ThemePreviewWidget(Gfx::Palette const& palette)
|
|||
set_fixed_size(304, 201);
|
||||
}
|
||||
|
||||
void ThemePreviewWidget::set_theme(DeprecatedString path)
|
||||
ErrorOr<void> ThemePreviewWidget::set_theme(DeprecatedString path)
|
||||
{
|
||||
set_theme_from_file(*Core::File::open(path, Core::OpenMode::ReadOnly).release_value_but_fixme_should_propagate_errors());
|
||||
auto config_file = TRY(Core::File::open(path, Core::OpenMode::ReadOnly));
|
||||
TRY(set_theme_from_file(config_file));
|
||||
return {};
|
||||
}
|
||||
|
||||
void ThemePreviewWidget::paint_preview(GUI::PaintEvent&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue