forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user