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

@@ -856,7 +856,7 @@ bool WatchModel::setData(const QModelIndex &idx, const QVariant &value, int role
case Qt::EditRole:
switch (idx.column()) {
case 0: {
m_handler->watchExpression(value.toString());
m_handler->watchExpression(value.toString().trimmed());
break;
}
case 1: // Change value
@@ -1491,7 +1491,7 @@ void WatchHandler::loadSessionData()
QVariant value = sessionValue("Watchers");
m_model->m_watchRoot->removeChildren();
foreach (const QString &exp, value.toStringList())
watchExpression(exp);
watchExpression(exp.trimmed());
}
WatchModelBase *WatchHandler::model() const