Commit 3e8f02e2 authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk
Browse files

DebuggerItemModel: Device constant for Abi Role



Change-Id: I1879e704f6286874602a2540e9c22f806bf8115a
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ac734968
......@@ -37,6 +37,8 @@
namespace Debugger {
namespace Internal {
const int AbiRole = Qt::UserRole + 2;
static QList<QStandardItem *> describeItem(const DebuggerItem &item)
{
QList<QStandardItem *> row;
......@@ -44,7 +46,7 @@ static QList<QStandardItem *> describeItem(const DebuggerItem &item)
row.append(new QStandardItem(item.command().toUserOutput()));
row.append(new QStandardItem(item.engineTypeName()));
row.at(0)->setData(item.id());
row.at(0)->setData(item.abiNames(), Qt::UserRole + 2);
row.at(0)->setData(item.abiNames(), AbiRole);
row.at(0)->setEditable(false);
row.at(1)->setEditable(false);
row.at(1)->setData(item.toMap());
......@@ -158,7 +160,7 @@ bool DebuggerItemModel::updateDebuggerStandardItem(const DebuggerItem &item, boo
QFont font = sitem->font();
font.setBold(changed);
parent->child(row, 0)->setData(item.displayName(), Qt::DisplayRole);
parent->child(row, 0)->setData(item.abiNames(), Qt::UserRole + 2);
parent->child(row, 0)->setData(item.abiNames(), AbiRole);
parent->child(row, 0)->setFont(font);
parent->child(row, 1)->setData(item.command().toUserOutput(), Qt::DisplayRole);
parent->child(row, 1)->setFont(font);
......@@ -178,7 +180,7 @@ DebuggerItem DebuggerItemModel::debuggerItem(QStandardItem *sitem) const
item.m_id = i->data();
item.setDisplayName(i->data(Qt::DisplayRole).toString());
QStringList abis = i->data(Qt::UserRole + 2).toStringList();
QStringList abis = i->data(AbiRole).toStringList();
QList<ProjectExplorer::Abi> abiList;
foreach (const QString &abi, abis)
abiList << ProjectExplorer::Abi(abi);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment