Merge pull request #35 from sophiekovalevsky/exit-gracefully

gui: exits gracefully
This commit is contained in:
jankae 2021-06-28 21:00:47 +02:00 committed by GitHub
commit a21586c438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}