forked from qt-creator/qt-creator
Debugger: Disable watcher removals
... when engine does not support watcher insertion while running. Change-Id: I1b4500f75b43176df7dc31f4a5840afb2347dd36 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -737,14 +737,15 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
p = pp;
|
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();
|
QString removeExp = p.data(LocalsExpressionRole).toString();
|
||||||
QAction actRemoveWatchExpression(removeWatchActionText(removeExp), 0);
|
QAction actRemoveWatchExpression(removeWatchActionText(removeExp), 0);
|
||||||
actRemoveWatchExpression.setEnabled(showExpressionActions && !exp.isEmpty());
|
actRemoveWatchExpression.setEnabled(canRemoveWatches && !exp.isEmpty());
|
||||||
|
|
||||||
QAction actRemoveAllWatchExpression(tr("Remove All Expression Evaluators"), 0);
|
QAction actRemoveAllWatchExpression(tr("Remove All Expression Evaluators"), 0);
|
||||||
actRemoveAllWatchExpression.setEnabled(showExpressionActions
|
actRemoveAllWatchExpression.setEnabled(canRemoveWatches
|
||||||
&& !handler->watchedExpressions().isEmpty());
|
&& !handler->watchedExpressions().isEmpty());
|
||||||
|
|
||||||
QMenu formatMenu(tr("Change Local Display Format..."));
|
QMenu formatMenu(tr("Change Local Display Format..."));
|
||||||
|
|||||||
Reference in New Issue
Block a user