gui: exits gracefully

This commit is contained in:
Kiara Navarro 2021-06-27 19:34:42 -03:00
parent f5991fef0e
commit 25caf77c52
No known key found for this signature in database
GPG Key ID: CDEFDCA3F6E04955

View File

@ -17,6 +17,7 @@ static AppWindow *window;
void sig_handler(int s) {
Q_UNUSED(s)
window->close();
app->quit();
}
int main(int argc, char *argv[]) {
@ -36,6 +37,6 @@ int main(int argc, char *argv[]) {
app = new QApplication(argc, argv_ext);
window = new AppWindow;
signal(SIGINT, sig_handler);
app->exec();
return 0;
auto rc = app->exec();
return rc;
}