mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:37:34 +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();
|
||||
|
|
|
@ -13,7 +13,7 @@ GalleryWidget::GalleryWidget()
|
|||
set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto& inner_widget = add<GUI::Widget>();
|
||||
(void)inner_widget.try_set_layout<GUI::VerticalBoxLayout>(4).release_value_but_fixme_should_propagate_errors();
|
||||
inner_widget.try_set_layout<GUI::VerticalBoxLayout>(4).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_tab_widget = inner_widget.try_add<GUI::TabWidget>().release_value_but_fixme_should_propagate_errors();
|
||||
m_statusbar = add<GUI::Statusbar>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue