mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +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
|
@ -190,7 +190,7 @@ void BookmarksBarWidget::model_did_update(unsigned)
|
|||
|
||||
button.set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
button.set_text(title);
|
||||
button.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png"));
|
||||
button.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png").release_value_but_fixme_should_propagate_errors());
|
||||
button.set_fixed_size(font().width(title) + 32, 20);
|
||||
button.set_relative_rect(rect);
|
||||
button.set_focus_policy(GUI::FocusPolicy::TabFocus);
|
||||
|
@ -242,7 +242,7 @@ void BookmarksBarWidget::update_content_size()
|
|||
auto& bookmark = m_bookmarks.at(i);
|
||||
bookmark.set_visible(false);
|
||||
m_additional_menu->add_action(GUI::Action::create(bookmark.text(),
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png"),
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png").release_value_but_fixme_should_propagate_errors(),
|
||||
[&](auto&) {
|
||||
bookmark.on_click(0);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue