summaryrefslogtreecommitdiffstats
path: root/application/dialogs/NewInstanceDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-05-04 00:29:40 +0200
committerPetr Mrázek <peterix@gmail.com>2016-05-04 00:29:40 +0200
commit603b0408aba4c7d0a5e6b5d4a052068572fbc80f (patch)
tree10d5fb926443a51c2a64279ff1f72265302baeee /application/dialogs/NewInstanceDialog.cpp
parentecd5d3a2db1bc5812d72e9768fa7757b5da3bbda (diff)
downloadMultiMC-603b0408aba4c7d0a5e6b5d4a052068572fbc80f.tar
MultiMC-603b0408aba4c7d0a5e6b5d4a052068572fbc80f.tar.gz
MultiMC-603b0408aba4c7d0a5e6b5d4a052068572fbc80f.tar.lz
MultiMC-603b0408aba4c7d0a5e6b5d4a052068572fbc80f.tar.xz
MultiMC-603b0408aba4c7d0a5e6b5d4a052068572fbc80f.zip
GH-1560 trim whitespace from instance names when creating instances
Diffstat (limited to 'application/dialogs/NewInstanceDialog.cpp')
-rw-r--r--application/dialogs/NewInstanceDialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/dialogs/NewInstanceDialog.cpp b/application/dialogs/NewInstanceDialog.cpp
index 1e12c9ba..678d923f 100644
--- a/application/dialogs/NewInstanceDialog.cpp
+++ b/application/dialogs/NewInstanceDialog.cpp
@@ -147,12 +147,12 @@ QString NewInstanceDialog::instName() const
auto result = ui->instNameTextBox->text();
if(result.size())
{
- return result;
+ return result.trimmed();
}
result = ui->instNameTextBox->placeholderText();
if(result.size() && result != originalPlaceholderText)
{
- return result;
+ return result.trimmed();
}
return QString();
}