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:
parent
f0409081f5
commit
c7d891765c
Notes:
sideshowbarker
2024-07-18 08:38:30 +09:00
Author: https://github.com/awesomekling
Commit: c7d891765c
131 changed files with 422 additions and 421 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue