From c7d891765cc87ec04f8d332b93fc7c3f82521d7f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 21 Jul 2021 18:02:15 +0200 Subject: LibGfx: Use "try_" prefix for static factory functions Also mark them as [[nodiscard]]. --- Userland/Services/Taskbar/ShutdownDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Services/Taskbar/ShutdownDialog.cpp') 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(); auto& icon_image = icon_wrapper.add(); - 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(); right_container.set_layout(); @@ -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(); -- cgit v1.2.3