diff options
| author | Liderate <Liderate@users.noreply.github.com> | 2023-10-14 05:19:14 -0400 |
|---|---|---|
| committer | Liderate <Liderate@users.noreply.github.com> | 2023-10-21 04:25:12 -0400 |
| commit | f6af8ed275fade4347b2d5012bb7bc8910fa24c6 (patch) | |
| tree | cbe6d52439c2c958d4c8bcc31f208228ce41e71b /src | |
| parent | d57d8bdd5a4462c644ad300dc19bf2e02d0ab534 (diff) | |
Replace spaces with ? wildcard for #1605
Diffstat (limited to 'src')
| -rw-r--r-- | src/settingsdialogpaths.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/settingsdialogpaths.cpp b/src/settingsdialogpaths.cpp index 1907b7fa..895edfac 100644 --- a/src/settingsdialogpaths.cpp +++ b/src/settingsdialogpaths.cpp @@ -199,9 +199,14 @@ void PathsSettingsTab::on_browseGameDirBtn_clicked() { QFileInfo oldGameExe(ui->managedGameDirEdit->text()); - QString temp = - QFileDialog::getOpenFileName(&dialog(), QObject::tr("Select game executable"), - oldGameExe.absolutePath(), oldGameExe.fileName()); + // this gets the name of the game executable + // + // spaces in the name are interpreted as separators ";" in the filter, + // so we replace them with the single character matching wildcard "?" + // + QString temp = QFileDialog::getOpenFileName( + &dialog(), QObject::tr("Select game executable"), oldGameExe.absolutePath(), + oldGameExe.fileName().replace(QRegularExpression(" "), "?")); if (temp.isEmpty()) { return; |
