mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
Everywhere: Replace most cases of exit() with Application::quit()
Application::quit() is nicer for most cases where exit() is used. Cases where exit() is used intentionally for early termination are left intact.
This commit is contained in:
parent
2caafacd9b
commit
73c1b1617a
5 changed files with 12 additions and 11 deletions
|
@ -250,7 +250,7 @@ int main(int argc, char** argv)
|
|||
if (!app_state.selected_index.has_value())
|
||||
return;
|
||||
app_state.results[app_state.selected_index.value()].activate();
|
||||
exit(0);
|
||||
GUI::Application::the()->quit();
|
||||
};
|
||||
text_box.on_up_pressed = [&]() {
|
||||
if (!app_state.visible_result_count)
|
||||
|
@ -278,7 +278,7 @@ int main(int argc, char** argv)
|
|||
mark_selected_item();
|
||||
};
|
||||
text_box.on_escape_pressed = []() {
|
||||
exit(0);
|
||||
GUI::Application::the()->quit();
|
||||
};
|
||||
|
||||
db.on_new_results = [&](auto results) {
|
||||
|
@ -298,7 +298,7 @@ int main(int argc, char** argv)
|
|||
match.set_subtitle(result.subtitle());
|
||||
match.on_selected = [&result]() {
|
||||
result.activate();
|
||||
exit(0);
|
||||
GUI::Application::the()->quit();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue