summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/settingsdialogpaths.cpp11
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;