forked from qt-creator/qt-creator
QmlProfiler: eliminate redundant categories() methods
Change-Id: I3a85322cc583de37f1cc4eb256e3382a92c5c179 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -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 ++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user