QmlProfiler: eliminate redundant categories() methods

Change-Id: I3a85322cc583de37f1cc4eb256e3382a92c5c179
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-02-14 13:14:54 +01:00
parent adada0b95d
commit db7c75597c
9 changed files with 6 additions and 21 deletions

View File

@@ -95,11 +95,11 @@ void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
}
// order?
int TimelineModelAggregator::categories() const
int TimelineModelAggregator::categoryCount() const
{
int categoryCount = 0;
foreach (const AbstractTimelineModel *modelProxy, d->modelList)
categoryCount += modelProxy->categories();
categoryCount += modelProxy->categoryCount();
return categoryCount;
}
@@ -107,7 +107,7 @@ int TimelineModelAggregator::visibleCategories() const
{
int categoryCount = 0;
foreach (const AbstractTimelineModel *modelProxy, d->modelList) {
for (int i = 0; i < modelProxy->categories(); i++)
for (int i = 0; i < modelProxy->categoryCount(); i++)
if (modelProxy->categoryDepth(i) > 0)
categoryCount ++;
}