From 5ac407eeccc446b9ba958cea2cc1fb47e4090dd4 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 28 Jul 2014 14:23:52 +0200 Subject: 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 Reviewed-by: hjk --- src/plugins/debugger/stackhandler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/debugger/stackhandler.cpp') diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index e13c7577a0..073e4c8c1f 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -63,7 +63,7 @@ StackHandler::StackHandler() m_contentsValid = false; m_currentIndex = -1; m_canExpand = false; - connect(debuggerCore()->action(OperateByInstruction), SIGNAL(triggered()), + connect(action(OperateByInstruction), SIGNAL(triggered()), this, SLOT(resetModel())); } @@ -123,7 +123,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const ? m_positionIcon : m_emptyIcon; } - if (role == Qt::ToolTipRole && debuggerCore()->boolSetting(UseToolTipsInStackView)) + if (role == Qt::ToolTipRole && boolSetting(UseToolTipsInStackView)) return frame.toToolTip(); return QVariant(); @@ -151,8 +151,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const if (index.row() == m_stackFrames.size()) return QAbstractTableModel::flags(index); const StackFrame &frame = m_stackFrames.at(index.row()); - const bool isValid = frame.isUsable() - || debuggerCore()->boolSetting(OperateByInstruction); + const bool isValid = frame.isUsable() || boolSetting(OperateByInstruction); return isValid && m_contentsValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(); } @@ -222,7 +221,7 @@ void StackHandler::prependFrames(const StackFrames &frames) int StackHandler::firstUsableIndex() const { - if (!debuggerCore()->boolSetting(OperateByInstruction)) { + if (!boolSetting(OperateByInstruction)) { for (int i = 0, n = m_stackFrames.size(); i != n; ++i) if (m_stackFrames.at(i).isUsable()) return i; -- cgit v1.2.1