Debugger: Add some menu actions.

- Windows: Inspect a module by running depends.
- Clear all watches.
This commit is contained in:
Friedemann Kleint
2011-01-14 17:28:37 +01:00
parent 1aef962e5a
commit 2f6a86d6a5
4 changed files with 39 additions and 2 deletions

View File

@@ -379,11 +379,15 @@ 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);
actRemoveWatches->setEnabled(!WatchHandler::watcherNames().isEmpty());
if (m_type == LocalsType)
menu.addAction(actWatchExpression);
else
else {
menu.addAction(actRemoveWatchExpression);
menu.addAction(actRemoveWatches);
}
QMenu memoryMenu;
memoryMenu.setTitle(tr("Open Memory Editor..."));
@@ -481,6 +485,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
watchExpression(exp);
} else if (act == actRemoveWatchExpression) {
removeWatchExpression(exp);
} else if (act == actRemoveWatches) {
currentEngine()->watchHandler()->clearWatches();
} else if (act == actClearCodeModelSnapshot) {
debuggerCore()->clearCppCodeModelSnapshot();
} else if (act == clearTypeFormatAction) {