Qt: Delete settings windows on close
This commit is contained in:
parent
b98ac8722a
commit
a0370c7fb7
|
@ -68,6 +68,13 @@ SettingsWindow::~SettingsWindow()
|
|||
s_open_game_properties_dialogs.removeOne(this);
|
||||
}
|
||||
|
||||
void SettingsWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
// we need to clean up ourselves, since we're not modal
|
||||
if (isPerGameSettings())
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void SettingsWindow::addPages()
|
||||
{
|
||||
addWidget(
|
||||
|
|
|
@ -98,7 +98,8 @@ private Q_SLOTS:
|
|||
void onRestoreDefaultsClicked();
|
||||
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent* event);
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
private:
|
||||
enum : u32
|
||||
|
|
Loading…
Reference in New Issue