QmlProfiler: switch storage for typeId and selectionId

The selectionIds are an integral part of the timeline and have to be
given for each event. The typeIds are optional. Thus it makes more
sense to store the selectionIds in the basic Range classes and have the
derived models handle the typeIds instead of doing it the other way
around.

Change-Id: I824224b6f58e8d45311134887482586283fbff41
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-10-28 14:26:57 +01:00
committed by Ulf Hermann
parent 4ec75995f8
commit 307d45ecaa
7 changed files with 68 additions and 51 deletions

View File

@@ -259,15 +259,9 @@ QVariantMap QmlProfilerRangeModel::location(int index) const
return result;
}
bool QmlProfilerRangeModel::handlesTypeId(int typeId) const
int QmlProfilerRangeModel::typeId(int index) const
{
if (typeId < 0)
return false;
const QmlProfilerDataModel::QmlEventTypeData &type =
modelManager()->qmlModel()->getEventTypes().at(typeId);
if (type.message != message() || type.rangeType != rangeType())
return false;
return true;
return selectionId(index);
}
int QmlProfilerRangeModel::selectionIdForLocation(const QString &filename, int line, int column) const