QmlProfiler: Store typeIds in range data

We'll need to refer to them for additional global metadata.

Change-Id: I717d3199b5ce8846c273b93bb8cd31fe3941035b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-08-29 19:30:30 +02:00
parent 38f4d6a5f2
commit 71ac095612
6 changed files with 22 additions and 25 deletions

View File

@@ -98,8 +98,8 @@ void RangeTimelineModel::loadData()
continue;
// store starttime-based instance
d->data.insert(insert(event.startTime, event.duration),
QmlRangeEventStartInstance(event.typeIndex));
d->data.insert(insert(event.startTime, event.duration, event.typeIndex),
QmlRangeEventStartInstance());
d->modelManager->modelProxyCountUpdated(d->modelId, count(), eventList.count() * 6);
}
@@ -162,7 +162,7 @@ void RangeTimelineModel::RangeTimelineModelPrivate::computeExpandedLevels()
QHash<int, int> eventRow;
int eventCount = q->count();
for (int i = 0; i < eventCount; i++) {
int typeId = data[i].typeId;
int typeId = q->range(i).typeId;
if (!eventRow.contains(typeId)) {
eventRow[typeId] = expandedRowTypes.size();
expandedRowTypes << typeId;
@@ -194,14 +194,14 @@ void RangeTimelineModel::RangeTimelineModelPrivate::findBindingLoops()
// check whether event is already in stack
for (int ii = 0; ii < callStack.size(); ++ii) {
if (callStack.at(ii).first == data[i].typeId) {
if (callStack.at(ii).first == q->range(i).typeId) {
data[i].bindingLoopHead = callStack.at(ii).second;
break;
}
}
CallStackEntry newEntry(data[i].typeId, i);
CallStackEntry newEntry(q->range(i).typeId, i);
callStack.push(newEntry);
}
@@ -224,12 +224,6 @@ int RangeTimelineModel::row(int index) const
return d->data[index].displayRowCollapsed;
}
int RangeTimelineModel::selectionId(int index) const
{
Q_D(const RangeTimelineModel);
return d->data[index].typeId;
}
int RangeTimelineModel::bindingLoopDest(int index) const
{
Q_D(const RangeTimelineModel);