diff options
author | hjk <[email protected]> | 2014-07-28 14:23:52 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2014-07-28 15:48:15 +0200 |
commit | 5ac407eeccc446b9ba958cea2cc1fb47e4090dd4 (patch) | |
tree | 6e48d9fe5a335efc8d5208b5000885ba2db710ba /src/plugins/debugger/stackwindow.cpp | |
parent | 15fcdabc1d18f55a68a91251e8c581791c1aff8f (diff) |
Debugger: Reduce line noise
Move some function out of the DebuggerCore "namespace", to avoid one
indirection and removes clutter in the calling code.
Change-Id: I1c870d5c7eeade32fa63dedf581490fbb090cd6a
Reviewed-by: Christian Stenger <[email protected]>
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/stackwindow.cpp')
-rw-r--r-- | src/plugins/debugger/stackwindow.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 99ef7af26e7..1fac02b4ea8 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -55,20 +55,15 @@ namespace Debugger { namespace Internal { -static DebuggerEngine *currentEngine() -{ - return debuggerCore()->currentEngine(); -} - StackTreeView::StackTreeView() { setWindowTitle(tr("Stack")); - connect(debuggerCore()->action(UseAddressInStackView), SIGNAL(toggled(bool)), + connect(action(UseAddressInStackView), SIGNAL(toggled(bool)), SLOT(showAddressColumn(bool))); - connect(debuggerCore()->action(ExpandStack), SIGNAL(triggered()), + connect(action(ExpandStack), SIGNAL(triggered()), SLOT(reloadFullStack())); - connect(debuggerCore()->action(MaximalStackDepth), SIGNAL(triggered()), + connect(action(MaximalStackDepth), SIGNAL(triggered()), SLOT(reloadFullStack())); showAddressColumn(false); } @@ -88,7 +83,7 @@ void StackTreeView::setModel(QAbstractItemModel *model) BaseTreeView::setModel(model); resizeColumnToContents(0); resizeColumnToContents(3); - showAddressColumn(debuggerCore()->action(UseAddressInStackView)->isChecked()); + showAddressColumn(action(UseAddressInStackView)->isChecked()); } // Input a function to be disassembled. Accept CDB syntax @@ -155,7 +150,7 @@ void StackTreeView::contextMenuEvent(QContextMenuEvent *ev) const quint64 address = frame.address; QMenu menu; - menu.addAction(debuggerCore()->action(ExpandStack)); + menu.addAction(action(ExpandStack)); QAction *actCopyContents = menu.addAction(tr("Copy Contents to Clipboard")); actCopyContents->setEnabled(model() != 0); @@ -164,7 +159,7 @@ void StackTreeView::contextMenuEvent(QContextMenuEvent *ev) actSaveTaskFile->setEnabled(model() != 0); if (engine->hasCapability(CreateFullBacktraceCapability)) - menu.addAction(debuggerCore()->action(CreateFullBacktrace)); + menu.addAction(action(CreateFullBacktrace)); QAction *additionalQmlStackAction = 0; if (engine->hasCapability(AdditionalQmlStackCapability)) @@ -204,12 +199,12 @@ void StackTreeView::contextMenuEvent(QContextMenuEvent *ev) actLoadSymbols = menu.addAction(tr("Try to Load Unknown Symbols")); if (engine->hasCapability(MemoryAddressCapability)) - menu.addAction(debuggerCore()->action(UseAddressInStackView)); + menu.addAction(action(UseAddressInStackView)); menu.addSeparator(); - menu.addAction(debuggerCore()->action(UseToolTipsInStackView)); + menu.addAction(action(UseToolTipsInStackView)); menu.addSeparator(); - menu.addAction(debuggerCore()->action(SettingsDialog)); + menu.addAction(action(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); if (!act) |