1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:28:11 +00:00

Inspector: Propagate errors using try_set_main_widget in main

This commit is contained in:
creator1creeper1 2022-01-07 15:24:14 +01:00 committed by Andreas Kling
parent 45e68b2aa4
commit cb3a643f35

View file

@ -95,11 +95,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}));
help_menu.add_action(GUI::CommonActions::make_about_action("Inspector", app_icon, window));
auto& widget = window->set_main_widget<GUI::Widget>();
widget.set_fill_with_background_color(true);
widget.set_layout<GUI::VerticalBoxLayout>();
auto widget = TRY(window->try_set_main_widget<GUI::Widget>());
widget->set_fill_with_background_color(true);
widget->set_layout<GUI::VerticalBoxLayout>();
auto& splitter = widget.add<GUI::HorizontalSplitter>();
auto& splitter = widget->add<GUI::HorizontalSplitter>();
remote_process.on_update = [&] {
if (!remote_process.process_name().is_null())