mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
This commit is contained in:
parent
16f064d9be
commit
235f39e449
104 changed files with 412 additions and 397 deletions
|
@ -238,7 +238,7 @@ void BrowserWindow::build_menus()
|
|||
|
||||
m_search_engine_actions.set_exclusive(true);
|
||||
auto& search_engine_menu = settings_menu.add_submenu("&Search Engine");
|
||||
search_engine_menu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png"));
|
||||
search_engine_menu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png").release_value_but_fixme_should_propagate_errors());
|
||||
bool search_engine_set = false;
|
||||
auto add_search_engine = [&](auto& name, auto& url_format) {
|
||||
auto action = GUI::Action::create_checkable(
|
||||
|
@ -301,7 +301,7 @@ void BrowserWindow::build_menus()
|
|||
}
|
||||
|
||||
auto& color_scheme_menu = settings_menu.add_submenu("&Color Scheme");
|
||||
color_scheme_menu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/color-chooser.png"));
|
||||
color_scheme_menu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/color-chooser.png").release_value_but_fixme_should_propagate_errors());
|
||||
{
|
||||
auto current_setting = Web::CSS::preferred_color_scheme_from_string(Config::read_string("Browser", "Preferences", "ColorScheme", "auto"));
|
||||
m_color_scheme_actions.set_exclusive(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue