Commit 20308d42 authored by hjk's avatar hjk

debugger: list "details" field in thread view

Change-Id: I86437498d05f90f80e154248ddf959d9a990aacd
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 174eb7c2
......@@ -58,6 +58,7 @@ struct ThreadData
StateColumn,
NameColumn,
TargetIdColumn,
DetailsColumn,
CoreColumn,
ComboNameColumn,
ColumnCount = CoreColumn
......@@ -84,6 +85,7 @@ struct ThreadData
QString function;
QString module;
QString fileName;
QString details;
QString state;
qint32 lineNumber;
QString name;
......
......@@ -154,6 +154,8 @@ QVariant ThreadsHandler::data(const QModelIndex &index, int role) const
return thread.targetId;
case ThreadData::NameColumn:
return thread.name;
case ThreadData::DetailsColumn:
return thread.details;
case ThreadData::ComboNameColumn:
return QString::fromLatin1("#%1 %2").arg(thread.id).arg(thread.name);
}
......@@ -192,6 +194,8 @@ QVariant ThreadsHandler::headerData
return tr("State");
case ThreadData::TargetIdColumn:
return tr("Target ID");
case ThreadData::DetailsColumn:
return tr("Details");
case ThreadData::NameColumn:
return tr("Name");
}
......@@ -310,6 +314,7 @@ Threads ThreadsHandler::parseGdbmiThreads(const GdbMi &data, int *currentThread)
ThreadData thread;
thread.id = item.findChild("id").data().toInt();
thread.targetId = QString::fromLatin1(item.findChild("target-id").data());
thread.details = QString::fromLatin1(item.findChild("details").data());
thread.core = QString::fromLatin1(item.findChild("core").data());
thread.state = QString::fromLatin1(item.findChild("state").data());
thread.address = frame.findChild("addr").data().toULongLong(&ok, 0);
......
......@@ -64,6 +64,7 @@ void ThreadsTreeView::setModel(QAbstractItemModel *model)
resizeColumnToContents(ThreadData::NameColumn);
resizeColumnToContents(ThreadData::StateColumn);
resizeColumnToContents(ThreadData::TargetIdColumn);
resizeColumnToContents(ThreadData::DetailsColumn);
}
void ThreadsTreeView::contextMenuEvent(QContextMenuEvent *ev)
......
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