QmlProfiler: nesting events in the timeline view

Change-Id: I6bc534a7fc02cb8c647dfc90a78b698592719a91
Reviewed-on: http://codereview.qt.nokia.com/843
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-06-27 17:12:25 +02:00
parent 5525e7d20d
commit 79311f273a
3 changed files with 19 additions and 5 deletions

View File

@@ -202,6 +202,8 @@ void TimelineView::updateTimeline(bool updateStartX)
ctxt->setContextProperty("fileName", m_ranges.property(i).property("fileName").toString());
ctxt->setContextProperty("line", m_ranges.property(i).property("line").toNumber());
ctxt->setContextProperty("index", i);
ctxt->setContextProperty("nestingLevel", m_ranges.property(i).property("nestingLevel").toNumber());
ctxt->setContextProperty("nestingDepth", m_ranges.property(i).property("nestingDepth").toNumber());
QString label;
QVariantList list = m_ranges.property(i).property("label").toVariant().value<QVariantList>();
for (int i = 0; i < list.size(); ++i) {
@@ -226,7 +228,8 @@ void TimelineView::updateTimeline(bool updateStartX)
}
if (item) {
item->setX(m_starts.at(i)*spacing);
item->setWidth((m_ends.at(i)-m_starts.at(i)) * spacing);
qreal width = (m_ends.at(i)-m_starts.at(i)) * spacing;
item->setWidth(width > 1 ? width : 1);
item->setZValue(++z);
}
if (creating)