Display thread names

extract thread names from QThread object name

Task-Number: QTCREATORBUG-382
Reviewed-by: hjk
This commit is contained in:
Arvid Ephraim Picciani
2010-09-13 12:37:30 +02:00
parent f7b19f8114
commit 98736d256b
7 changed files with 86 additions and 2 deletions

View File

@@ -149,6 +149,10 @@ QVariant ThreadsHandler::data(const QModelIndex &index, int role) const
return thread.core;
case ThreadData::StateColumn:
return thread.state;
case ThreadData::NameColumn:
if (thread.name.isEmpty())
return thread.id;
return thread.name;
}
case Qt::ToolTipRole:
return threadToolTip(thread);
@@ -183,6 +187,8 @@ QVariant ThreadsHandler::headerData
return tr("Core");
case ThreadData::StateColumn:
return tr("State");
case ThreadData::NameColumn:
return tr("Name");
}
return QVariant();
}