mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
This commit is contained in:
parent
77ad0fdb07
commit
6b66e39df4
20 changed files with 47 additions and 48 deletions
|
@ -42,7 +42,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto catdog_widget = TRY(CatDog::create());
|
||||
window->set_main_widget(catdog_widget);
|
||||
(void)TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
TRY(catdog_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
|
||||
auto context_menu = TRY(GUI::Menu::try_create());
|
||||
TRY(context_menu->try_add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window)));
|
||||
|
@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
advice_window->set_alpha_hit_threshold(1.0f);
|
||||
|
||||
auto advice_widget = TRY(advice_window->set_main_widget<SpeechBubble>(catdog_widget));
|
||||
(void)TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 0));
|
||||
|
||||
auto advice_timer = TRY(Core::Timer::create_single_shot(15'000, [&] {
|
||||
window->move_to_front();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue