Debugger: Fix removal of expression that ends with whitespace

* Start a debugging session
* Add an evaluated expression "(char*)foo "
* Delete the expression
* Press F10
* It reappears

Change-Id: I5c54ca6ab2f4be6c613880a2747e4aff653d15be
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-03-19 22:35:39 +02:00
committed by Orgad Shaneh
parent 59172f9ab4
commit d9135665f0
3 changed files with 4 additions and 3 deletions

View File

@@ -1108,7 +1108,7 @@ void WatchTreeView::inputNewExpression()
"\">documentation</a>."));
dlg.setHistoryCompleter(QLatin1String("WatchItems"));
if (dlg.exec() == QDialog::Accepted) {
QString exp = dlg.text();
const QString exp = dlg.text().trimmed();
if (!exp.isEmpty())
watchExpression(exp, exp);
}