forked from qt-creator/qt-creator
Debugger: Fix action to remove all watch items.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user