diff options
author | hjk <hjk@theqtcompany.com> | 2016-06-27 14:38:36 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-06-28 14:28:01 +0000 |
commit | 2a104dcfe7329cb264a27b154ab122b51efad10d (patch) | |
tree | db90159923ba090a46ac841fea47849374f76dc2 /src/plugins/debugger/stackhandler.cpp | |
parent | 5199f84f60ed07d75bb071ba2d2de375adeefec7 (diff) |
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 <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
-rw-r--r-- | src/plugins/debugger/stackhandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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("<More>"); 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)) |