mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
SystemMonitor: Convert most widgets to a failable factory
I didn't convert widgets that don't do any failable tasks currently or are lazy-initialized.
This commit is contained in:
committed by
Andreas Kling
parent
a5936864d9
commit
412630637a
@@ -71,11 +71,13 @@ private:
|
||||
Vector<Symbolication::Symbol> m_symbols;
|
||||
};
|
||||
|
||||
ThreadStackWidget::ThreadStackWidget()
|
||||
ErrorOr<NonnullRefPtr<ThreadStackWidget>> ThreadStackWidget::try_create()
|
||||
{
|
||||
set_layout<GUI::VerticalBoxLayout>(4);
|
||||
m_stack_table = add<GUI::TableView>();
|
||||
m_stack_table->set_model(adopt_ref(*new ThreadStackModel()));
|
||||
auto widget = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) ThreadStackWidget()));
|
||||
TRY(widget->try_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;
|
||||
}
|
||||
|
||||
void ThreadStackWidget::show_event(GUI::ShowEvent&)
|
||||
|
||||
Reference in New Issue
Block a user