aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-13 17:53:00 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-16 14:50:32 +0000
commit4ff20dfa8cdd3f36bb1783d7535bbf9cb1c5ab70 (patch)
tree7eb0f41fd5a082c09bda77615535817ab353526f /src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
parent185412cee7ae1362d0a8b073d5dce590b3736ead (diff)
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>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
index fba91915f6a..7d76f4ef485 100644
--- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
@@ -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