From 2a104dcfe7329cb264a27b154ab122b51efad10d Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 27 Jun 2016 14:38:36 +0200 Subject: Debugger: Consolidate icon storage handling We settled now on global objects being fine for the purpose in Core and ProjectExplorer, so there's no point in using something more fancy in the debugger. Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153 Reviewed-by: Christian Stenger --- src/plugins/debugger/stackhandler.cpp | 8 +++----- 1 file changed, 3 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 8ab60b8675..ffcb003d3b 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -54,9 +54,7 @@ namespace Internal { */ StackHandler::StackHandler(DebuggerEngine *engine) - : m_engine(engine), - m_positionIcon(Icons::LOCATION.icon()), - m_emptyIcon(Icons::EMPTY.icon()) + : m_engine(engine) { setObjectName(QLatin1String("StackModel")); m_resetLocationScheduled = false; @@ -93,7 +91,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const if (role == Qt::DisplayRole && index.column() == StackFunctionNameColumn) return tr(""); if (role == Qt::DecorationRole && index.column() == StackLevelColumn) - return m_emptyIcon; + return Icons::EMPTY.icon(); return QVariant(); } @@ -120,7 +118,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const if (role == Qt::DecorationRole && index.column() == StackLevelColumn) { // Return icon that indicates whether this is the active stack frame return (m_contentsValid && index.row() == m_currentIndex) - ? m_positionIcon : m_emptyIcon; + ? Icons::LOCATION.icon() : Icons::EMPTY.icon(); } if (role == Qt::ToolTipRole && boolSetting(UseToolTipsInStackView)) -- cgit v1.2.1