GH-1560 trim whitespace from instance names when creating instances
This commit is contained in:
parent
ecd5d3a2db
commit
603b0408ab
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user