debugger: fix regression when trying to remove watched expressions

Change-Id: I0d12339ab1903dc78eec699e07fc0c17daab0e5d
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-05-24 16:24:53 +02:00
committed by hjk
parent e11a3a7697
commit cc6a3b4fd7
4 changed files with 16 additions and 29 deletions

View File

@@ -1609,6 +1609,7 @@ void WatchHandler::insertData(const QList<WatchData> &list)
void WatchHandler::removeAllData()
{
m_model->reinitialize();
updateWatchersWindow();
}
void WatchHandler::removeData(const QByteArray &iname)
@@ -1616,6 +1617,7 @@ void WatchHandler::removeData(const QByteArray &iname)
WatchItem *item = m_model->findItem(iname);
if (item)
m_model->destroyItem(item);
updateWatchersWindow();
}
void WatchHandler::removeChildren(const QByteArray &iname)
@@ -1623,6 +1625,7 @@ void WatchHandler::removeChildren(const QByteArray &iname)
WatchItem *item = m_model->findItem(iname);
if (item)
m_model->destroyChildren(item);
updateWatchersWindow();
}
QByteArray WatchHandler::watcherName(const QByteArray &exp)
@@ -1766,22 +1769,6 @@ void WatchHandler::clearWatches()
saveWatchers();
}
void WatchHandler::removeWatchExpression(const QString &exp0)
{
QByteArray exp = exp0.toLatin1();
MODEL_DEBUG("REMOVE WATCH: " << exp);
theWatcherNames.remove(exp);
foreach (WatchItem *item, m_model->m_watchRoot->children) {
if (item->exp == exp) {
m_model->destroyItem(item);
saveWatchers();
updateWatchersWindow();
break;
}
}
}
void WatchHandler::updateWatchersWindow()
{
// Force show/hide of watchers and return view.