Qt: Prevent crash when closed by the window manager

This commit is contained in:
Simon McFarlane committed 2015-05-10 13:57:44 -07:00
1 parent 94995503aa
commit 6474616c83
2 files changed
+6

No files matched your search

+5
View File
@@ -92,6 +92,11 @@ DMainWindow::~DMainWindow()
{ {
} }
void DMainWindow::closeEvent(QCloseEvent* ce)
{
Stop();
}
// Emulation // Emulation
void DMainWindow::StartGame(const QString filename) void DMainWindow::StartGame(const QString filename)
+1
View File
@@ -63,6 +63,7 @@ private slots:
void UpdateIcons(); void UpdateIcons();
private: private:
void closeEvent(QCloseEvent* ce);
std::unique_ptr<Ui::DMainWindow> m_ui; std::unique_ptr<Ui::DMainWindow> m_ui;
DGameTracker* m_game_tracker; DGameTracker* m_game_tracker;