1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibGfx: Use "try_" prefix for static factory functions

Also mark them as [[nodiscard]].
This commit is contained in:
Andreas Kling 2021-07-21 18:02:15 +02:00
parent f0409081f5
commit c7d891765c
Notes: sideshowbarker 2024-07-18 08:38:30 +09:00
131 changed files with 422 additions and 421 deletions

View file

@ -186,7 +186,7 @@ void ServerConnectionWrapper::on_crash()
void ServerConnectionWrapper::show_frequenct_crashes_notification() const
{
auto notification = GUI::Notification::construct();
notification->set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-hack-studio.png"));
notification->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-hack-studio.png"));
notification->set_title("LanguageServer Crashes too much!");
notification->set_text("LanguageServer aided features will not be available in this session");
notification->show();
@ -194,7 +194,7 @@ void ServerConnectionWrapper::show_frequenct_crashes_notification() const
void ServerConnectionWrapper::show_crash_notification() const
{
auto notification = GUI::Notification::construct();
notification->set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-hack-studio.png"));
notification->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-hack-studio.png"));
notification->set_title("Oops!");
notification->set_text(String::formatted("LanguageServer has crashed"));
notification->show();