debugger: work on "watchers" for use with new dumpers

This commit is contained in:
hjk
2009-12-04 13:36:14 +01:00
parent accc2c6926
commit ecb0df0cb5
5 changed files with 44 additions and 21 deletions

View File

@@ -267,8 +267,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
actWatchKnownMemory = new QAction(tr("Open memory editor at %1").arg(address), &menu);
menu.addSeparator();
int atype = (m_type == LocalsType) ? WatchExpression : RemoveWatchExpression;
menu.addAction(theDebuggerAction(atype)->updatedAction(exp));
QAction *actWatchOrRemove;
if (m_type == LocalsType) {
actWatchOrRemove = theDebuggerAction(WatchExpression)->updatedAction(exp);
} else {
actWatchOrRemove = theDebuggerAction(RemoveWatchExpression)->updatedAction(exp);
// Also for the case where the user cleared the expression.
actWatchOrRemove->setEnabled(true);
}
menu.addAction(actWatchOrRemove);
menu.addAction(actInsertNewWatchItem);
menu.addAction(actSelectWidgetToWatch);