diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-05-04 00:29:40 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-05-04 00:29:40 +0200 |
commit | 603b0408aba4c7d0a5e6b5d4a052068572fbc80f (patch) | |
tree | 10d5fb926443a51c2a64279ff1f72265302baeee /application/dialogs | |
parent | ecd5d3a2db1bc5812d72e9768fa7757b5da3bbda (diff) | |
download | MultiMC-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')
-rw-r--r-- | application/dialogs/NewInstanceDialog.cpp | 4 |
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(); } |