From 725623583fb9486628f500e8f8b042ebc0988c6b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 18 Nov 2014 17:37:25 +0100 Subject: QmlProfiler: Separate expanded and collapsed row heights and counts We'll need to access both of them when building the scene graph. This change also clarifies the dynamics between expanding categories and row heights and offsets. Change-Id: I2e2bf488ad973c95d05f230bf6fff63598f39bf2 Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp') diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index 47f37a4ca6..d945fe5186 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -188,12 +188,14 @@ QString QmlProfilerRangeModel::categoryLabel(QmlDebug::RangeType rangeType) QmlProfilerModelManager::featureName(QmlDebug::featureFromRangeType(rangeType))); } -int QmlProfilerRangeModel::row(int index) const +int QmlProfilerRangeModel::expandedRow(int index) const { - if (expanded()) - return m_data[index].displayRowExpanded; - else - return m_data[index].displayRowCollapsed; + return m_data[index].displayRowExpanded; +} + +int QmlProfilerRangeModel::collapsedRow(int index) const +{ + return m_data[index].displayRowCollapsed; } int QmlProfilerRangeModel::bindingLoopDest(int index) const -- cgit v1.2.1