diff --git a/Applications/About/main.cpp b/Applications/About/main.cpp index ead9a03808..bd405bd719 100644 --- a/Applications/About/main.cpp +++ b/Applications/About/main.cpp @@ -39,7 +39,7 @@ int main(int argc, char** argv) quit_button->set_caption("Okay"); quit_button->set_relative_rect(80, 100, widget->width() - 160, 20); quit_button->on_click = [] (GButton&) { - GApplication::the().exit(0); + GApplication::the().quit(0); }; window->show(); diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index 3027abb23f..ea0560c2d6 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -19,7 +19,7 @@ int main(int argc, char** argv) auto app_menu = make("FileManager"); app_menu->add_action(make("Quit", String(), [] (const GAction&) { - GApplication::the().exit(0); + GApplication::the().quit(0); return; })); menubar->add_menu(move(app_menu)); diff --git a/Applications/Terminal/Terminal.cpp b/Applications/Terminal/Terminal.cpp index 97b6ea5e6f..70721af153 100644 --- a/Applications/Terminal/Terminal.cpp +++ b/Applications/Terminal/Terminal.cpp @@ -27,12 +27,12 @@ Terminal::Terminal(int ptm_fd) if (nread < 0) { dbgprintf("Terminal read error: %s\n", strerror(errno)); perror("read(ptm)"); - GApplication::the().exit(1); + GApplication::the().quit(1); return; } if (nread == 0) { dbgprintf("Terminal: EOF on master pty, closing.\n"); - GApplication::the().exit(0); + GApplication::the().quit(0); return; } for (ssize_t i = 0; i < nread; ++i) diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp index 780c1b32fa..f1dc759dc8 100644 --- a/Applications/Terminal/main.cpp +++ b/Applications/Terminal/main.cpp @@ -98,7 +98,7 @@ int main(int argc, char** argv) auto app_menu = make("Terminal"); app_menu->add_action(make("Quit", String(), [] (const GAction&) { dbgprintf("Terminal: Quit menu activated!\n"); - GApplication::the().exit(0); + GApplication::the().quit(0); return; })); menubar->add_menu(move(app_menu)); diff --git a/LibGUI/GApplication.cpp b/LibGUI/GApplication.cpp index a5d520c5a6..f212bbf202 100644 --- a/LibGUI/GApplication.cpp +++ b/LibGUI/GApplication.cpp @@ -26,9 +26,9 @@ int GApplication::exec() return m_event_loop->exec(); } -void GApplication::exit(int exit_code) +void GApplication::quit(int exit_code) { - m_event_loop->exit(exit_code); + m_event_loop->quit(exit_code); } void GApplication::set_menubar(OwnPtr&& menubar) diff --git a/LibGUI/GApplication.h b/LibGUI/GApplication.h index 0a139b2cd2..723eeec3e4 100644 --- a/LibGUI/GApplication.h +++ b/LibGUI/GApplication.h @@ -12,7 +12,7 @@ public: ~GApplication(); int exec(); - void exit(int); + void quit(int); void set_menubar(OwnPtr&&); diff --git a/LibGUI/GEventLoop.cpp b/LibGUI/GEventLoop.cpp index d13dfa4c88..6120007231 100644 --- a/LibGUI/GEventLoop.cpp +++ b/LibGUI/GEventLoop.cpp @@ -66,7 +66,7 @@ GEventLoop& GEventLoop::main() return *s_mainGEventLoop; } -void GEventLoop::exit(int code) +void GEventLoop::quit(int code) { m_exit_requested = true; m_exit_code = code; @@ -257,7 +257,7 @@ void GEventLoop::wait_for_event() if (event.type == WSAPI_ServerMessage::Error) { dbgprintf("GEventLoop got error message from server\n"); dbgprintf(" - error message: %s\n", String(event.text, event.text_length).characters()); - exit(1); + quit(1); return; } @@ -307,7 +307,7 @@ bool GEventLoop::drain_messages_from_server() ssize_t nread = read(m_event_fd, &message, sizeof(WSAPI_ServerMessage)); if (nread < 0) { perror("read"); - exit(1); + quit(1); return false; } if (nread == 0) diff --git a/LibGUI/GEventLoop.h b/LibGUI/GEventLoop.h index 1918e732cf..f2c436898d 100644 --- a/LibGUI/GEventLoop.h +++ b/LibGUI/GEventLoop.h @@ -32,7 +32,7 @@ public: void register_notifier(Badge, GNotifier&); void unregister_notifier(Badge, GNotifier&); - void exit(int); + void quit(int); bool post_message_to_server(const WSAPI_ClientMessage&); bool wait_for_specific_event(WSAPI_ServerMessage::Type, WSAPI_ServerMessage&); diff --git a/LibGUI/GWindow.cpp b/LibGUI/GWindow.cpp index c3e74186b9..49771bc8d9 100644 --- a/LibGUI/GWindow.cpp +++ b/LibGUI/GWindow.cpp @@ -46,7 +46,7 @@ void GWindow::close() // FIXME: If we exit the event loop, we're never gonna deal with the delete_later request! // This will become relevant once we support nested event loops. if (should_exit_app_on_close()) - GEventLoop::main().exit(0); + GEventLoop::main().quit(0); delete_later(); }