@@ -25,7 +25,7 RenameVariableDialog::~RenameVariableDialog() noexcept | |||||
25 |
|
25 | |||
26 | QString RenameVariableDialog::name() const noexcept |
|
26 | QString RenameVariableDialog::name() const noexcept | |
27 | { |
|
27 | { | |
28 | return ui->nameLineEdit->text(); |
|
28 | return ui->nameLineEdit->text().trimmed(); | |
29 | } |
|
29 | } | |
30 |
|
30 | |||
31 | void RenameVariableDialog::accept() |
|
31 | void RenameVariableDialog::accept() | |
@@ -38,7 +38,7 void RenameVariableDialog::accept() | |||||
38 | }; |
|
38 | }; | |
39 |
|
39 | |||
40 | // Empty name |
|
40 | // Empty name | |
41 |
auto name = |
|
41 | auto name = this->name(); | |
42 | if (name.isEmpty()) { |
|
42 | if (name.isEmpty()) { | |
43 | invalidateInput(tr("A variable name must be specified")); |
|
43 | invalidateInput(tr("A variable name must be specified")); | |
44 | return; |
|
44 | return; |
General Comments 0
You need to be logged in to leave comments.
Login now