forked from qt-creator/qt-creator
QmlProfiler: Move location lookup into base model
We will need it in a second derived model. Change-Id: I5d2459c490034b592f643f248bf5be2e44af44aa Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -242,17 +242,7 @@ QVariantMap QmlProfilerRangeModel::details(int index) const
|
||||
|
||||
QVariantMap QmlProfilerRangeModel::location(int index) const
|
||||
{
|
||||
QVariantMap result;
|
||||
int id = selectionId(index);
|
||||
|
||||
const QmlDebug::QmlEventLocation &location
|
||||
= modelManager()->qmlModel()->getEventTypes().at(id).location;
|
||||
|
||||
result.insert(QStringLiteral("file"), location.filename);
|
||||
result.insert(QStringLiteral("line"), location.line);
|
||||
result.insert(QStringLiteral("column"), location.column);
|
||||
|
||||
return result;
|
||||
return locationFromTypeId(index);
|
||||
}
|
||||
|
||||
int QmlProfilerRangeModel::typeId(int index) const
|
||||
|
||||
Reference in New Issue
Block a user