diff options
| author | Tannin <devnull@localhost> | 2014-07-14 21:22:44 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-07-14 21:22:44 +0200 |
| commit | 84c66727bff954fd0820fc9f33833848496e9531 (patch) | |
| tree | ca3497150eb9f124d7a124cc48c8d6d1330b7243 /src/settings.cpp | |
| parent | af8973312188c3d90b8e3f8e2f8036d35e3f21ea (diff) | |
- when highlighting a mod the overwritten and overwriting mods are now highlighted in the list
- when starting an external application MO now wraps the process in a job and waits on that instead. This way MO is not unlocked early when skyrim is started through skse
- mod info dialog no longer offers the esp tab for foreign mods because that caused confusion
- updated translation files
- download directory and mod directory are now created if necessary
- bugfix: staging script created unnecessary copies of translation files
- bugfix: potential invalid array access when trying to determine best mod order
- bugfix: deleter file wasn't removed after esp hiding was disabled
- bugfix: potential access to to un-initialized login reply
- bugfix: changed the initialization order to allow more ui controls to be localized
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index c2855a85..3c78ed62 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -669,22 +669,33 @@ void Settings::query(QWidget *parent) m_Settings.setValue("Settings/compact_downloads", compactBox->isChecked()); m_Settings.setValue("Settings/meta_downloads", showMetaBox->isChecked()); m_Settings.setValue("Settings/load_mechanism", mechanismBox->itemData(mechanismBox->currentIndex()).toInt()); - if (QDir(downloadDirEdit->text()).exists()) { - m_Settings.setValue("Settings/download_directory", QDir::toNativeSeparators(downloadDirEdit->text())); - } - if (!QDir(cacheDirEdit->text()).exists()) { - QDir().mkpath(cacheDirEdit->text()); - } - m_Settings.setValue("Settings/cache_directory", QDir::toNativeSeparators(cacheDirEdit->text())); - if (QDir(modDirEdit->text()).exists()) { + + + { // advanced settings if ((QDir::fromNativeSeparators(modDirEdit->text()) != QDir::fromNativeSeparators(getModDirectory())) && (QMessageBox::question(NULL, tr("Confirm"), tr("Changing the mod directory affects all your profiles! " "Mods not present (or named differently) in the new location will be disabled in all profiles. " "There is no way to undo this unless you backed up your profiles manually. Proceed?"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)) { - m_Settings.setValue("Settings/mod_directory", QDir::toNativeSeparators(modDirEdit->text())); + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)) { + modDirEdit->setText(getModDirectory()); + } + + if (!QDir(downloadDirEdit->text()).exists()) { + QDir().mkpath(downloadDirEdit->text()); } + if (!QDir(cacheDirEdit->text()).exists()) { + QDir().mkpath(cacheDirEdit->text()); + } + if (!QDir(modDirEdit->text()).exists()) { + QDir().mkpath(modDirEdit->text()); + } + + m_Settings.setValue("Settings/download_directory", QDir::toNativeSeparators(downloadDirEdit->text())); + m_Settings.setValue("Settings/cache_directory", QDir::toNativeSeparators(cacheDirEdit->text())); + m_Settings.setValue("Settings/mod_directory", QDir::toNativeSeparators(modDirEdit->text())); } + + QString oldLanguage = m_Settings.value("Settings/language", "en_US").toString(); QString newLanguage = languageBox->itemData(languageBox->currentIndex()).toString(); if (newLanguage != oldLanguage) { |
