Qt: Remove obsolete main window close()

The gui settings aren't part of the main window anymore
This commit is contained in:
Megamouse 2020-07-03 12:11:43 +02:00
parent dc25a3fa2a
commit 332f9cae77
1 changed files with 2 additions and 4 deletions

View File

@ -66,6 +66,8 @@ main_window::main_window(std::shared_ptr<gui_settings> gui_settings, std::shared
// We have to setup the ui before using a translation
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
}
main_window::~main_window()
@ -2153,10 +2155,6 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
SaveWindowState();
// I need the gui settings to sync, and that means having the destructor called as guiSetting's parent is main_window.
setAttribute(Qt::WA_DeleteOnClose);
QMainWindow::close();
// It's possible to have other windows open, like games. So, force the application to die.
QApplication::quit();
}