debugger: use '*' as name for all pointers, add pointee only for display purposes

This commit is contained in:
hjk
2010-01-06 13:30:11 +01:00
parent 6ced1c3e75
commit 85b4b826ab
2 changed files with 6 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ public:
{ parent = 0; }
void setData(const WatchData &data)
{ static_cast<WatchData &>(*this) = data; }
{ static_cast<WatchData &>(*this) = data; parent = 0; }
WatchItem *parent;
QList<WatchItem *> children; // fetched children
@@ -775,12 +775,15 @@ void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
QVariant WatchModel::data(const QModelIndex &idx, int role) const
{
const WatchItem &data = *watchItem(idx);
const WatchItem *item = watchItem(idx);
const WatchItem &data = *item;
switch (role) {
case Qt::DisplayRole: {
switch (idx.column()) {
case 0:
if (data.name == QLatin1String("*") && item->parent)
return QLatin1String("*") + item->parent->name;
return data.name;
case 1: {
int format = m_handler->m_individualFormats.value(data.iname, -1);