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/Welcome | |
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/Welcome')
-rw-r--r-- | Userland/Applications/Welcome/WelcomeWidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Welcome/WelcomeWidget.cpp b/Userland/Applications/Welcome/WelcomeWidget.cpp index 0caf473d4d..623cdb65b1 100644 --- a/Userland/Applications/Welcome/WelcomeWidget.cpp +++ b/Userland/Applications/Welcome/WelcomeWidget.cpp @@ -28,14 +28,14 @@ WelcomeWidget::WelcomeWidget() tip_frame.set_fill_with_background_color(true); auto& light_bulb_label = *find_descendant_of_type_named<GUI::Label>("light_bulb_label"); - light_bulb_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-welcome.png")); + light_bulb_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-welcome.png")); m_web_view = *find_descendant_of_type_named<Web::OutOfProcessWebView>("web_view"); m_tip_label = *find_descendant_of_type_named<GUI::Label>("tip_label"); m_next_button = *find_descendant_of_type_named<GUI::Button>("next_button"); - m_next_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png")); + m_next_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png")); m_next_button->on_click = [&](auto) { if (!tip_frame.is_visible()) { m_web_view->set_visible(false); @@ -50,7 +50,7 @@ WelcomeWidget::WelcomeWidget() }; m_help_button = *find_descendant_of_type_named<GUI::Button>("help_button"); - m_help_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/book-open.png")); + m_help_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/book-open.png")); m_help_button->on_click = [](auto) { pid_t pid; const char* argv[] = { "Help", nullptr }; |