aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/stackwindow.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2012-01-12 20:28:17 +0100
committerhjk <[email protected]>2012-01-16 16:33:43 +0100
commit496e9fafd0a321a923e96bdddd03617feb18f2ad (patch)
tree07684c3d835450fdd0b5bc15e3e863d2698e7d46 /src/plugins/debugger/stackwindow.cpp
parent1c1b3840c594004801817befdd192c19f7f659c4 (diff)
debugger: replace static capability check by something potentially dynamic
This does not yet use the potential. Change-Id: I087311fb7d59b46e49f65a84c4420c72a1227ebb Reviewed-by: Aurindam Jana <[email protected]>
Diffstat (limited to 'src/plugins/debugger/stackwindow.cpp')
-rw-r--r--src/plugins/debugger/stackwindow.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp
index a4109493157..b2f5d6a38de 100644
--- a/src/plugins/debugger/stackwindow.cpp
+++ b/src/plugins/debugger/stackwindow.cpp
@@ -97,7 +97,6 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
StackHandler *handler = engine->stackHandler();
const QModelIndex index = indexAt(ev->pos());
const int row = index.row();
- const unsigned engineCapabilities = engine->debuggerCapabilities();
StackFrame frame;
if (row >= 0 && row < handler->stackSize())
frame = handler->frameAt(row);
@@ -109,25 +108,25 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
QAction *actCopyContents = menu.addAction(tr("Copy Contents to Clipboard"));
actCopyContents->setEnabled(model() != 0);
- if (engineCapabilities & CreateFullBacktraceCapability)
+ if (engine->hasCapability(CreateFullBacktraceCapability))
menu.addAction(debuggerCore()->action(CreateFullBacktrace));
QAction *actShowMemory = 0;
- if (engineCapabilities & ShowMemoryCapability) {
+ if (engine->hasCapability(ShowMemoryCapability)) {
actShowMemory = menu.addAction(QString());
if (address == 0) {
actShowMemory->setText(tr("Open Memory Editor"));
actShowMemory->setEnabled(false);
} else {
actShowMemory->setText(tr("Open Memory Editor at 0x%1").arg(address, 0, 16));
- actShowMemory->setEnabled(engineCapabilities & ShowMemoryCapability);
+ actShowMemory->setEnabled(engine->hasCapability(ShowMemoryCapability));
}
}
QAction *actShowDisassemblerAt = 0;
QAction *actShowDisassembler = 0;
- if (engineCapabilities & DisassemblerCapability) {
+ if (engine->hasCapability(DisassemblerCapability)) {
actShowDisassemblerAt = menu.addAction(QString());
actShowDisassembler = menu.addAction(tr("Open Disassembler..."));
if (address == 0) {
@@ -140,13 +139,13 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
QAction *actLoadSymbols = 0;
- if (engineCapabilities & ShowModuleSymbolsCapability)
+ if (engine->hasCapability(ShowModuleSymbolsCapability))
actLoadSymbols = menu.addAction(tr("Try to Load Unknown Symbols"));
#if 0 // @TODO: not implemented
menu.addAction(debuggerCore()->action(UseToolTipsInStackView));
#endif
- if (engineCapabilities & MemoryAddressCapability)
+ if (engine->hasCapability(MemoryAddressCapability))
menu.addAction(debuggerCore()->action(UseAddressInStackView));
menu.addSeparator();