Commit 54e85ad1 authored by hjk's avatar hjk
Browse files

Debugger: Disable watcher removals



... when engine does not support watcher insertion while running.

Change-Id: I1b4500f75b43176df7dc31f4a5840afb2347dd36
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent b45bfbf6
......@@ -737,14 +737,15 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
p = pp;
}
bool showExpressionActions = (canHandleWatches || state == DebuggerNotReady) && m_type == WatchersType;
bool canRemoveWatches = ((canHandleWatches && canInsertWatches) || state == DebuggerNotReady)
&& m_type == WatchersType;
QString removeExp = p.data(LocalsExpressionRole).toString();
QAction actRemoveWatchExpression(removeWatchActionText(removeExp), 0);
actRemoveWatchExpression.setEnabled(showExpressionActions && !exp.isEmpty());
actRemoveWatchExpression.setEnabled(canRemoveWatches && !exp.isEmpty());
QAction actRemoveAllWatchExpression(tr("Remove All Expression Evaluators"), 0);
actRemoveAllWatchExpression.setEnabled(showExpressionActions
actRemoveAllWatchExpression.setEnabled(canRemoveWatches
&& !handler->watchedExpressions().isEmpty());
QMenu formatMenu(tr("Change Local Display Format..."));
......
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