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

Userland: Use non-fallible EventReceiver::add() where possible

This commit is contained in:
Tim Ledbetter 2023-09-22 22:28:59 +01:00 committed by Andreas Kling
parent 707ca984bd
commit b4e134cb52
54 changed files with 934 additions and 934 deletions

View file

@ -24,8 +24,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
main_widget->set_layout<GUI::VerticalBoxLayout>(16);
auto button = TRY(main_widget->try_add<GUI::Button>("Click me!"_string));
button->on_click = [&](auto) {
auto& button = main_widget->add<GUI::Button>("Click me!"_string);
button.on_click = [&](auto) {
GUI::MessageBox::show(window, "Hello friends!"sv, ":^)"sv);
};