LibGUI: Remove Widget::try_set_layout<T>()

And fall back to the infallible set_layout<T>().

Work towards #20557.
This commit is contained in:
Andreas Kling 2023-08-13 14:52:36 +02:00
commit 8322b31b97
Notes: sideshowbarker 2024-07-17 00:37:23 +09:00
52 changed files with 127 additions and 135 deletions

View file

@ -74,7 +74,7 @@ private:
ErrorOr<NonnullRefPtr<ThreadStackWidget>> ThreadStackWidget::try_create()
{
auto widget = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) ThreadStackWidget()));
TRY(widget->try_set_layout<GUI::VerticalBoxLayout>(4));
widget->set_layout<GUI::VerticalBoxLayout>(4);
widget->m_stack_table = TRY(widget->try_add<GUI::TableView>());
widget->m_stack_table->set_model(TRY(try_make_ref_counted<ThreadStackModel>()));
return widget;