diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-06 21:54:11 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-01-06 21:54:11 +0100 |
| commit | f2ea231f9212006f43ec29faa6c5b47810748a99 (patch) | |
| tree | f32a530ae25d325f9a3502a9a52dda990945d4f3 /src/profile.cpp | |
| parent | 2a010e5cdbe5ebf9a94b59d8a1e7e4557cbd1c52 (diff) | |
Made Delete INIs and Saves dialogs remember selection.
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index e8ead8e8..09c2a5f5 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -31,6 +31,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <dataarchives.h> #include "util.h" #include "registry.h" +#include <questionboxmemory.h> #include <QApplication> #include <QFile> // for QFile @@ -749,12 +750,12 @@ bool Profile::enableLocalSaves(bool enable) m_Directory.mkdir("saves"); } } else { - QMessageBox::StandardButton res = QMessageBox::question( - QApplication::activeModalWidget(), tr("Delete profile-specific save games?"), + QDialogButtonBox::StandardButton res; + res = QuestionBoxMemory::query(QApplication::activeModalWidget(), "deleteSavesQuery", + tr("Delete profile-specific save games?"), tr("Do you want to delete the profile-specific save games? (If you select \"No\", the " "save games will show up again if you re-enable profile-specific save games)"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, - QMessageBox::Cancel); + QDialogButtonBox::No | QDialogButtonBox::Yes | QDialogButtonBox::Cancel, QDialogButtonBox::No); if (res == QMessageBox::Yes) { shellDelete(QStringList(m_Directory.absoluteFilePath("saves"))); } else if (res == QMessageBox::No) { @@ -797,12 +798,12 @@ bool Profile::enableLocalSettings(bool enable) if (enable) { m_GamePlugin->initializeProfile(m_Directory.absolutePath(), IPluginGame::CONFIGURATION); } else { - QMessageBox::StandardButton res = QMessageBox::question( - QApplication::activeModalWidget(), tr("Delete profile-specific game INI files?"), + QDialogButtonBox::StandardButton res; + res = QuestionBoxMemory::query(QApplication::activeModalWidget(), "deleteINIQuery", + tr("Delete profile-specific game INI files?"), tr("Do you want to delete the profile-specific game INI files? (If you select \"No\", the " "INI files will be used again if you re-enable profile-specific game INI files.)"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, - QMessageBox::Cancel); + QDialogButtonBox::No | QDialogButtonBox::Yes | QDialogButtonBox::Cancel, QDialogButtonBox::No); if (res == QMessageBox::Yes) { QStringList filesToDelete; for (QString file : m_GamePlugin->iniFiles()) { |
