summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2014-11-18 17:37:25 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2014-12-05 14:15:15 +0100
commit725623583fb9486628f500e8f8b042ebc0988c6b (patch)
tree5830d2a3e26b9260f522a7e3e8ea2d3e0afc07b9 /src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
parentbc4586ffbe59373a47f9d63a2742a8f0f7ef4c05 (diff)
downloadqt-creator-725623583fb9486628f500e8f8b042ebc0988c6b.tar.gz
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 <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp12
1 files changed, 7 insertions, 5 deletions
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