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>
This commit is contained in:
hjk
2016-06-27 14:38:36 +02:00
parent 5199f84f60
commit 2a104dcfe7
15 changed files with 188 additions and 183 deletions

View File

@@ -48,18 +48,6 @@ namespace Internal {
//
///////////////////////////////////////////////////////////////////////
static const QIcon &positionIcon()
{
static QIcon icon = Icons::LOCATION.icon();
return icon;
}
static const QIcon &emptyIcon()
{
static QIcon icon = Icons::EMPTY.icon();
return icon;
}
class ThreadItem : public TreeItem
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::ThreadsHandler)
@@ -79,7 +67,8 @@ public:
case Qt::DecorationRole:
// Return icon that indicates whether this is the active stack frame.
if (column == 0)
return threadData.id == handler->currentThread() ? positionIcon() : emptyIcon();
return threadData.id == handler->currentThread() ? Icons::LOCATION.icon()
: Icons::EMPTY.icon();
break;
case ThreadData::IdRole:
return threadData.id.raw();