diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-04-09 15:11:22 +0200 |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-04-09 15:11:35 +0200 |
commit | 969fc516db3f23de47771b3ea686c60b44f8d3bb (patch) | |
tree | 2a77480c06adcf0ed5b9ad008f4ed5d37315900c /src/plugins/qmlinspector | |
parent | 36177b154341e197ac74c5af8fec98e20b2cdcb9 (diff) | |
download | qt-creator-969fc516db3f23de47771b3ea686c60b44f8d3bb.tar.gz |
QmlInspector: Object tree shows item's ID if available
Diffstat (limited to 'src/plugins/qmlinspector')
-rw-r--r-- | src/plugins/qmlinspector/components/objecttree.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qmlinspector/components/objecttree.cpp b/src/plugins/qmlinspector/components/objecttree.cpp index e4c187bbf6..b3c57caeb6 100644 --- a/src/plugins/qmlinspector/components/objecttree.cpp +++ b/src/plugins/qmlinspector/components/objecttree.cpp @@ -140,7 +140,10 @@ void ObjectTree::buildTree(const QDeclarativeDebugObjectReference &obj, QTreeWid clear(); QTreeWidgetItem *item = parent ? new QTreeWidgetItem(parent) : new QTreeWidgetItem(this); - item->setText(0, obj.className()); + if (obj.idString().isEmpty()) + item->setText(0, obj.className()); + else + item->setText(0, obj.idString()); item->setData(0, Qt::UserRole, qVariantFromValue(obj)); if (parent && obj.contextDebugId() >= 0 @@ -157,7 +160,9 @@ void ObjectTree::buildTree(const QDeclarativeDebugObjectReference &obj, QTreeWid } if (obj.contextDebugId() < 0) + { item->setForeground(0, Qt::lightGray); + } for (int ii = 0; ii < obj.children().count(); ++ii) buildTree(obj.children().at(ii), item); @@ -180,7 +185,7 @@ void ObjectTree::dump(const QDeclarativeDebugObjectReference &obj, int ind) { QByteArray indent(ind * 4, ' '); qWarning().nospace() << indent.constData() << qPrintable(obj.className()) - << " " << qPrintable(obj.name()) << " " + << " " << qPrintable(obj.idString()) << " " << obj.debugId(); for (int ii = 0; ii < obj.children().count(); ++ii) |