desktop: make MainWindow a "global object"

Thus, we don't have to delete it explicitly on exit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-03-13 18:45:50 +01:00 committed by Dirk Hohndel
parent 16aa761e86
commit ee9344eccf
2 changed files with 2 additions and 5 deletions

View file

@ -111,7 +111,7 @@ extern "C" void showErrorFromC(char *buf)
emit MainWindow::instance()->showError(error);
}
MainWindow::MainWindow() : QMainWindow(),
MainWindow::MainWindow() :
appState((ApplicationState)-1), // Invalid state
actionNextDive(nullptr),
actionPreviousDive(nullptr),