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:
Timothy 2021-08-03 22:05:07 +10:00 committed by Andreas Kling
commit 73c1b1617a
Notes: sideshowbarker 2024-07-18 07:31:20 +09:00
5 changed files with 12 additions and 11 deletions

View file

@ -73,8 +73,10 @@ void IRCAppWindow::setup_client()
if (m_client->hostname().is_empty()) {
String value;
if (GUI::InputBox::show(this, value, "Enter server:", "Connect to server") == GUI::InputBox::ExecCancel)
::exit(0);
if (GUI::InputBox::show(this, value, "Enter server:", "Connect to server") == GUI::InputBox::ExecCancel) {
GUI::Application::the()->quit();
return;
}
m_client->set_server(value, 6667);
}