diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-10-08 23:24:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-08 23:24:53 -0400 |
| commit | c01e80a651f5e25441330ad20253bb47ad0f516c (patch) | |
| tree | c801c21b793f2fd4d9c141b7c0efe9836912a99a /src/settingsdialog.cpp | |
| parent | 94b40b328b7e455ad4799b98c2b00cd5d96f86f3 (diff) | |
| parent | 3d97b0efd04326c0252411fc6639c4c6df2f2160 (diff) | |
Merge pull request #858 from isanae/proper-exit
Proper exit procedure
Diffstat (limited to 'src/settingsdialog.cpp')
| -rw-r--r-- | src/settingsdialog.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 8fb25b1c..daccfba9 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -33,8 +33,8 @@ SettingsDialog::SettingsDialog(PluginContainer *pluginContainer, Settings& setti : TutorableDialog("SettingsDialog", parent) , ui(new Ui::SettingsDialog) , m_settings(settings) + , m_exit(Exit::None) , m_pluginContainer(pluginContainer) - , m_restartNeeded(false) { ui->setupUi(this); @@ -61,9 +61,14 @@ QWidget* SettingsDialog::parentWidgetForDialogs() } } -void SettingsDialog::setRestartNeeded() +void SettingsDialog::setExitNeeded(ExitFlags e) { - m_restartNeeded = true; + m_exit = e; +} + +ExitFlags SettingsDialog::exitNeeded() const +{ + return m_exit; } int SettingsDialog::exec() @@ -87,16 +92,6 @@ int SettingsDialog::exec() } } - if (m_restartNeeded) { - if (QMessageBox::question(parentWidgetForDialogs(), - tr("Restart Mod Organizer?"), - tr("In order to finish configuration changes, MO must be restarted.\n" - "Restart it now?"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { - qApp->exit(INT_MAX); - } - } - return ret; } |
