1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Userland: Prefer non-fallible construction for LibGUI objects

This commit is contained in:
Tim Ledbetter 2023-09-18 06:00:51 +01:00 committed by Andreas Kling
parent a4a94de942
commit a6f6a1afd2
54 changed files with 69 additions and 70 deletions

View file

@ -117,7 +117,7 @@ ErrorOr<Vector<DeprecatedString>> discover_apps_and_categories()
ErrorOr<NonnullRefPtr<GUI::Menu>> build_system_menu(GUI::Window& window)
{
Vector<DeprecatedString> const sorted_app_categories = TRY(discover_apps_and_categories());
auto system_menu = TRY(GUI::Menu::try_create("\xE2\x9A\xA1"_string)); // HIGH VOLTAGE SIGN
auto system_menu = GUI::Menu::construct("\xE2\x9A\xA1"_string); // HIGH VOLTAGE SIGN
system_menu->add_action(GUI::Action::create("&About SerenityOS", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/ladyball.png"sv)), [&](auto&) {
GUI::Process::spawn_or_show_error(&window, "/bin/About"sv);