Qt: Remove obsolete main window close()
The gui settings aren't part of the main window anymore
This commit is contained in:
@@ -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
|
// We have to setup the ui before using a translation
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
main_window::~main_window()
|
main_window::~main_window()
|
||||||
@@ -2153,10 +2155,6 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
|
|||||||
|
|
||||||
SaveWindowState();
|
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.
|
// It's possible to have other windows open, like games. So, force the application to die.
|
||||||
QApplication::quit();
|
QApplication::quit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user