diff options
author | hjk <hjk121@nokiamail.com> | 2014-07-28 14:23:52 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-07-28 15:48:15 +0200 |
commit | 5ac407eeccc446b9ba958cea2cc1fb47e4090dd4 (patch) | |
tree | 6e48d9fe5a335efc8d5208b5000885ba2db710ba /src/plugins/debugger/stackhandler.cpp | |
parent | 15fcdabc1d18f55a68a91251e8c581791c1aff8f (diff) | |
download | qt-creator-5ac407eeccc446b9ba958cea2cc1fb47e4090dd4.tar.gz |
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 <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
-rw-r--r-- | src/plugins/debugger/stackhandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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; |