Merge pull request #35 from sophiekovalevsky/exit-gracefully
gui: exits gracefully
This commit is contained in:
commit
a21586c438
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user