Debugger: Introduce engine capability flags to enable actions correctly.

Reviewed-by: hjk
This commit is contained in:
Friedemann Kleint
2010-02-05 10:23:55 +01:00
parent 5c2738d6ee
commit b6c7c597c2
12 changed files with 66 additions and 17 deletions

View File

@@ -96,6 +96,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu menu;
const unsigned engineCapabilities = m_manager->debuggerCapabilities();
menu.addAction(theDebuggerAction(ExpandStack));
QAction *actCopyContents = menu.addAction(tr("Copy contents to clipboard"));
@@ -107,6 +108,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
actShowMemory->setEnabled(false);
} else {
actShowMemory->setText(tr("Open memory editor at %1").arg(address));
actShowMemory->setEnabled(engineCapabilities & ShowMemoryCapability);
}
QAction *actShowDisassembler = menu.addAction(QString());
@@ -115,6 +117,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
actShowDisassembler->setEnabled(false);
} else {
actShowDisassembler->setText(tr("Open disassembler at %1").arg(address));
actShowDisassembler->setEnabled(engineCapabilities & DisassemblerCapability);
}
menu.addSeparator();