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/Services/Taskbar/ShutdownDialog.cpp | |
parent | f0409081f562b635de3a23d7babbc7348cbb970c (diff) | |
download | serenity-c7d891765cc87ec04f8d332b93fc7c3f82521d7f.zip |
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
Diffstat (limited to 'Userland/Services/Taskbar/ShutdownDialog.cpp')
-rw-r--r-- | Userland/Services/Taskbar/ShutdownDialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/Taskbar/ShutdownDialog.cpp b/Userland/Services/Taskbar/ShutdownDialog.cpp index 8bc39e1c50..7f7ef31c90 100644 --- a/Userland/Services/Taskbar/ShutdownDialog.cpp +++ b/Userland/Services/Taskbar/ShutdownDialog.cpp @@ -63,7 +63,7 @@ ShutdownDialog::ShutdownDialog() icon_wrapper.set_layout<GUI::VerticalBoxLayout>(); auto& icon_image = icon_wrapper.add<GUI::ImageWidget>(); - icon_image.set_bitmap(Gfx::Bitmap::load_from_file("/res/icons/32x32/shutdown.png")); + icon_image.set_bitmap(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/shutdown.png")); auto& right_container = content_container.add<GUI::Widget>(); right_container.set_layout<GUI::VerticalBoxLayout>(); @@ -112,7 +112,7 @@ ShutdownDialog::ShutdownDialog() center_on_screen(); set_resizable(false); set_title("Exit SerenityOS"); - set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/power.png")); + set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/power.png")); // Request WindowServer to re-update us on the current theme as we might've not been alive for the last notification. refresh_system_theme(); |