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:
Ulf Hermann
2015-11-13 17:53:00 +01:00
parent 185412cee7
commit 4ff20dfa8c
3 changed files with 22 additions and 11 deletions

View File

@@ -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