forked from qt-creator/qt-creator
QmlProfiler: improve location lookup a bit
It's not a good idea to copy the event location for every single lookup and there is not point in always reconstructing the label strings, either. Change-Id: I2cea8a2a93b31d2c32bd2a27ae1d3b0bd26df6f6 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -343,12 +343,12 @@ const QVariantMap RangeTimelineModel::getEventLocation(int index) const
|
|||||||
QVariantMap result;
|
QVariantMap result;
|
||||||
int eventId = getEventId(index);
|
int eventId = getEventId(index);
|
||||||
|
|
||||||
QmlDebug::QmlEventLocation location
|
const QmlDebug::QmlEventLocation &location
|
||||||
= d->modelManager->qmlModel()->getEventTypes().at(eventId).location;
|
= d->modelManager->qmlModel()->getEventTypes().at(eventId).location;
|
||||||
|
|
||||||
result.insert(QLatin1String("file"), location.filename);
|
result.insert(QStringLiteral("file"), location.filename);
|
||||||
result.insert(QLatin1String("line"), location.line);
|
result.insert(QStringLiteral("line"), location.line);
|
||||||
result.insert(QLatin1String("column"), location.column);
|
result.insert(QStringLiteral("column"), location.column);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user