CrashReporter: Factorize exiting behavior to window->close()

This commit is contained in:
Lucas CHOLLET 2022-12-08 13:55:25 +01:00 committed by Andreas Kling
parent fef255ee22
commit f14006637d
Notes: sideshowbarker 2024-07-17 04:21:32 +09:00

View file

@ -264,9 +264,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto& close_button = *widget->find_descendant_of_type_named<GUI::Button>("close_button");
close_button.on_click = [&](auto) {
if (unlink_on_exit)
unlink_coredump(coredump_path);
app->quit();
window->close();
};
close_button.set_focus(true);