summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2009-08-14 12:56:12 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-08-14 12:56:12 (GMT)
commit5f13d479e4b9080f7a0d8bca05b020b3019aa272 (patch)
treede2534894b16a87daa144ef6aadfe221e047f1e0 /tools/qmldebugger
parent3e9d47531aa0d521b0724646642a95ffca780907 (diff)
downloadQt-5f13d479e4b9080f7a0d8bca05b020b3019aa272.zip
Qt-5f13d479e4b9080f7a0d8bca05b020b3019aa272.tar.gz
Qt-5f13d479e4b9080f7a0d8bca05b020b3019aa272.tar.bz2
Show full object tree in qml debugger
Clicking on an engine now automatically shows the object tree
Diffstat (limited to 'tools/qmldebugger')
-rw-r--r--tools/qmldebugger/engine.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/qmldebugger/engine.cpp b/tools/qmldebugger/engine.cpp
index 16d7f02..1f4bcc2 100644
--- a/tools/qmldebugger/engine.cpp
+++ b/tools/qmldebugger/engine.cpp
@@ -141,6 +141,8 @@ void EnginePane::queryContext(int id)
void EnginePane::contextChanged()
{
dump(m_context->rootContext(), 0);
+ foreach (const QmlDebugObjectReference &object, m_context->rootContext().objects())
+ fetchObject(object.debugId());
delete m_context; m_context = 0;
}
@@ -171,12 +173,19 @@ void EnginePane::dump(const QmlDebugObjectReference &obj, int ind)
void EnginePane::buildTree(const QmlDebugObjectReference &obj, QTreeWidgetItem *parent)
{
+ if (!parent)
+ m_objTree->clear();
+ m_objTree->expandAll();
+
QTreeWidgetItem *item = parent ? new QTreeWidgetItem(parent) : new QTreeWidgetItem(m_objTree);
item->setText(0, obj.className());
item->setData(0, Qt::UserRole, obj.debugId());
for (int ii = 0; ii < obj.children().count(); ++ii)
buildTree(obj.children().at(ii), item);
+
+ if (!parent)
+ m_objTree->expandAll();
}
void EnginePane::queryEngines()