diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-10-07 04:27:53 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-10-07 04:27:53 -0400 |
| commit | 3d97b0efd04326c0252411fc6639c4c6df2f2160 (patch) | |
| tree | 45249ce4d01da37203c032cc2ff0e4caf1b2ce06 /src/settingsdialog.cpp | |
| parent | 4dbd5412860deaf0d709be5dfac1b8772285d92d (diff) | |
added ExitModOrganizer(), used instead of qApp->exit()
reset geometry uses TaskDialog
moved restart code for the settings dialog to MainWindow
fixed settings sometimes not being saved when restarting
don't log "crash dumps present" every time the settings dialog is closed
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; } |
