1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Userland: Propagate errors with TRY() where possible

This commit is contained in:
Tim Ledbetter 2024-02-07 20:43:43 +00:00 committed by Tim Flynn
parent 3ffa2a39bc
commit 2331d2bafa
6 changed files with 20 additions and 20 deletions

View file

@ -46,8 +46,8 @@ ErrorOr<void> GalleryWidget::load_basic_model_tab()
m_add_new_item = *tab.find_descendant_of_type_named<GUI::Button>("add_new_item");
m_remove_selected_item = *tab.find_descendant_of_type_named<GUI::Button>("remove_selected_item");
m_add_new_item->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/plus.png"sv).release_value_but_fixme_should_propagate_errors());
m_remove_selected_item->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/minus.png"sv).release_value_but_fixme_should_propagate_errors());
m_add_new_item->set_icon(TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/plus.png"sv)));
m_remove_selected_item->set_icon(TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/minus.png"sv)));
m_new_item_name->on_return_pressed = [&] { add_textbox_contents_to_basic_model(); };
m_add_new_item->on_click = [&](auto) { add_textbox_contents_to_basic_model(); };