Commit 7bae5dd5 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Fix action to remove all watch items.

parent 2f6a86d6
......@@ -1330,8 +1330,9 @@ void WatchHandler::clearWatches()
{
if (m_watcherNames.isEmpty())
return;
foreach (WatchItem *item, m_watchers->rootItem()->children)
m_watchers->destroyItem(item);
const QList<WatchItem *> watches = m_watchers->rootItem()->children;
for (int i = watches.size() - 1; i >= 0; i--)
m_watchers->destroyItem(watches.at(i));
m_watcherNames.clear();
watcherCounter = 0;
updateWatchersWindow();
......
......@@ -379,7 +379,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QAction *actRemoveWatchExpression = new QAction(removeWatchActionText(exp), &menu);
actRemoveWatchExpression->setEnabled(
(canHandleWatches || state == DebuggerNotReady) && !exp.isEmpty());
QAction *actRemoveWatches = new QAction(tr("Clear Watch Items"), &menu);
QAction *actRemoveWatches = new QAction(tr("Remove All Watch Items"), &menu);
actRemoveWatches->setEnabled(!WatchHandler::watcherNames().isEmpty());
if (m_type == LocalsType)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment