Qt: Fix game properties dialogs keeping app open
This commit is contained in:
parent
8842a46a90
commit
2d4191f8ce
|
@ -770,6 +770,8 @@ void MainWindow::destroySubWindows()
|
||||||
m_settings_window->deleteLater();
|
m_settings_window->deleteLater();
|
||||||
m_settings_window = nullptr;
|
m_settings_window = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsWindow::closeGamePropertiesDialogs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu)
|
void MainWindow::populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu)
|
||||||
|
|
|
@ -520,3 +520,12 @@ void SettingsWindow::openGamePropertiesDialog(const std::string& path, const std
|
||||||
dialog->setWindowTitle(window_title);
|
dialog->setWindowTitle(window_title);
|
||||||
dialog->show();
|
dialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsWindow::closeGamePropertiesDialogs()
|
||||||
|
{
|
||||||
|
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
||||||
|
{
|
||||||
|
dialog->close();
|
||||||
|
dialog->deleteLater();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
~SettingsWindow();
|
~SettingsWindow();
|
||||||
|
|
||||||
static void openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region);
|
static void openGamePropertiesDialog(const std::string& path, const std::string& serial, DiscRegion region);
|
||||||
|
static void closeGamePropertiesDialogs();
|
||||||
|
|
||||||
ALWAYS_INLINE bool isPerGameSettings() const { return static_cast<bool>(m_sif); }
|
ALWAYS_INLINE bool isPerGameSettings() const { return static_cast<bool>(m_sif); }
|
||||||
ALWAYS_INLINE SettingsInterface* getSettingsInterface() const { return m_sif.get(); }
|
ALWAYS_INLINE SettingsInterface* getSettingsInterface() const { return m_sif.get(); }
|
||||||
|
|
Loading…
Reference in New Issue