diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-21 18:02:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-21 18:02:15 +0200 |
commit | c7d891765cc87ec04f8d332b93fc7c3f82521d7f (patch) | |
tree | 9d414d3ad62e0193b1b6fb0d12079e11e96e69b1 /Userland/Applications/Spreadsheet | |
parent | f0409081f562b635de3a23d7babbc7348cbb970c (diff) | |
download | serenity-c7d891765cc87ec04f8d332b93fc7c3f82521d7f.zip |
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r-- | Userland/Applications/Spreadsheet/HelpWindow.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Spreadsheet/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Spreadsheet/HelpWindow.cpp b/Userland/Applications/Spreadsheet/HelpWindow.cpp index e331054669..f3f07f222c 100644 --- a/Userland/Applications/Spreadsheet/HelpWindow.cpp +++ b/Userland/Applications/Spreadsheet/HelpWindow.cpp @@ -64,7 +64,7 @@ HelpWindow::HelpWindow(GUI::Window* parent) { resize(530, 365); set_title("Spreadsheet Functions Help"); - set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-help.png")); + set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-help.png")); auto& widget = set_main_widget<GUI::Widget>(); widget.set_layout<GUI::VerticalBoxLayout>(); diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp index 495c8a52f7..305d6a862a 100644 --- a/Userland/Applications/Spreadsheet/main.cpp +++ b/Userland/Applications/Spreadsheet/main.cpp @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) auto menubar = GUI::Menubar::construct(); auto& file_menu = menubar->add_menu("&File"); - file_menu.add_action(GUI::Action::create("Add New Sheet", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [&](auto&) { + file_menu.add_action(GUI::Action::create("Add New Sheet", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new-tab.png"), [&](auto&) { spreadsheet_widget.add_sheet(); })); file_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { |