GH-1560 trim whitespace from instance names when creating instances

This commit is contained in:
Petr Mrázek 2016-05-04 00:29:40 +02:00
parent ecd5d3a2db
commit 603b0408ab

View File

@ -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();
}