diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-20 20:06:05 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-26 20:24:37 +0000 |
commit | 82a152b69602de05a28034864185545207639a8c (patch) | |
tree | 308eb816ef76a6579934786822d39f186bad385b /Userland/Applications/Help | |
parent | 1971bff31455306b6976fe7e69db851c94a30794 (diff) | |
download | serenity-82a152b69602de05a28034864185545207639a8c.zip |
LibGfx: Remove `try_` prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
Diffstat (limited to 'Userland/Applications/Help')
-rw-r--r-- | Userland/Applications/Help/MainWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualModel.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp index 8f2fb0037f..65453b39e4 100644 --- a/Userland/Applications/Help/MainWidget.cpp +++ b/Userland/Applications/Help/MainWidget.cpp @@ -216,7 +216,7 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window) auto help_menu = TRY(window.try_add_menu("&Help")); String help_page_path = TRY(TRY(try_make_ref_counted<Manual::PageNode>(Manual::sections[1 - 1], TRY(String::from_utf8("Help"sv))))->path()); TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(&window))); - TRY(help_menu->try_add_action(GUI::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [this, help_page_path = move(help_page_path)](auto&) { + TRY(help_menu->try_add_action(GUI::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [this, help_page_path = move(help_page_path)](auto&) { open_page(help_page_path); }))); TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Help", TRY(GUI::Icon::try_create_default_icon("app-help"sv)), &window))); diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp index 49c80f2ced..906a3ad730 100644 --- a/Userland/Applications/Help/ManualModel.cpp +++ b/Userland/Applications/Help/ManualModel.cpp @@ -14,9 +14,9 @@ ManualModel::ManualModel() { - m_section_open_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/book-open.png"sv).release_value_but_fixme_should_propagate_errors()); - m_section_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/book.png"sv).release_value_but_fixme_should_propagate_errors()); - m_page_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors()); + m_section_open_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/book-open.png"sv).release_value_but_fixme_should_propagate_errors()); + m_section_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png"sv).release_value_but_fixme_should_propagate_errors()); + m_page_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors()); } Optional<GUI::ModelIndex> ManualModel::index_from_path(StringView path) const |