diff options
| author | Tannin <devnull@localhost> | 2015-08-31 21:24:04 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-08-31 21:24:04 +0200 |
| commit | 2a22461f14e0b52a9044917581a666318a197113 (patch) | |
| tree | 49b9287f7f49606e7a957bfa23a8fb55e8906880 | |
| parent | 83edfe0c961525fca3297b6862d5040b3da73d81 (diff) | |
bugfix: auto-discovered executables couldn't be customized
| -rw-r--r-- | src/editexecutablesdialog.cpp | 23 | ||||
| -rw-r--r-- | src/executableslist.cpp | 7 |
2 files changed, 17 insertions, 13 deletions
diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 3705bbd5..5a76195e 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -92,17 +92,18 @@ void EditExecutablesDialog::resetInput() void EditExecutablesDialog::saveExecutable() { m_ExecutablesList.updateExecutable(ui->titleEdit->text(), - QDir::fromNativeSeparators(ui->binaryEdit->text()), - ui->argumentsEdit->text(), - QDir::fromNativeSeparators(ui->workingDirEdit->text()), - (ui->closeCheckBox->checkState() == Qt::Checked) ? - ExecutableInfo::CloseMOStyle::DEFAULT_CLOSE - : ExecutableInfo::CloseMOStyle::DEFAULT_STAY, - ui->overwriteAppIDBox->isChecked() ? - ui->appIDOverwriteEdit->text() : "", - Executable::UseApplicationIcon, - ui->useAppIconCheckBox->isChecked() ? - Executable::UseApplicationIcon : Executable::Flags()); + QDir::fromNativeSeparators(ui->binaryEdit->text()), + ui->argumentsEdit->text(), + QDir::fromNativeSeparators(ui->workingDirEdit->text()), + (ui->closeCheckBox->checkState() == Qt::Checked) ? + ExecutableInfo::CloseMOStyle::DEFAULT_CLOSE + : ExecutableInfo::CloseMOStyle::DEFAULT_STAY, + ui->overwriteAppIDBox->isChecked() ? + ui->appIDOverwriteEdit->text() : "", + Executable::UseApplicationIcon | Executable::CustomExecutable, + (ui->useAppIconCheckBox->isChecked() ? + Executable::UseApplicationIcon : Executable::Flags()) + | Executable::CustomExecutable); } diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 7002ccc4..12e3d7aa 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -148,8 +148,11 @@ void ExecutablesList::updateExecutable(const QString &title, existingExe->m_Flags &= ~mask;
existingExe->m_Flags |= flags;
// for pre-configured executables don't overwrite settings we didn't store
- if (existingExe->isCustom()) {
- existingExe->m_BinaryInfo = file;
+ if (flags & Executable::CustomExecutable) {
+ if (file.exists()) {
+ // don't overwrite a valid binary with an invalid one
+ existingExe->m_BinaryInfo = file;
+ }
existingExe->m_Arguments = arguments;
existingExe->m_WorkingDirectory = workingDirectory;
existingExe->m_SteamAppID = steamAppID;
|
