Skip to content
Snippets Groups Projects
Commit b9fc3584 authored by Pea Nut's avatar Pea Nut
Browse files

Don't run Quit() twice during startup

`Quit()` in `main.cpp` calls `Quit()` in `gui/backend.go`
which calls `backend.Quit()` (`defined in pkg/backend/api.go`)

ways to test:
- Preferences -> Quit
- Systray -> Quit
- via signal: killall riseup-vpn

When we exit by Systray/Preferences, `QApplication::quit()` gets called
by `&Backend::quitDone` handler.
parent 59314382
No related branches found
No related tags found
1 merge request!225Close log file during teardown + some code cleanup
Pipeline #230983 passed
......@@ -79,6 +79,7 @@ QList<QVariant> getAvailableLocales() {
auto handler = [](int sig) -> void {
printf("\nCatched signal(%d): quitting\n", sig);
Quit();
QApplication::quit();
};
......@@ -112,11 +113,6 @@ int main(int argc, char **argv) {
app.setQuitOnLastWindowClosed(false);
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
QObject::connect(&app, &QApplication::aboutToQuit, []() {
qDebug() << ">>> Quitting, bye!";
Quit();
});
#ifdef OS_WIN
signal(SIGINT, handler);
signal(SIGTERM, handler);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment