forked from qt-creator/qt-creator
QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally change them. Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -57,9 +57,9 @@ ProfileFeature QmlProfilerTimelineModel::mainFeature() const
|
||||
return m_mainFeature;
|
||||
}
|
||||
|
||||
bool QmlProfilerTimelineModel::accepted(const QmlEventType &event) const
|
||||
bool QmlProfilerTimelineModel::accepted(const QmlEventType &type) const
|
||||
{
|
||||
return (event.rangeType == m_rangeType && event.message == m_message);
|
||||
return (type.rangeType() == m_rangeType && type.message() == m_message);
|
||||
}
|
||||
|
||||
bool QmlProfilerTimelineModel::handlesTypeId(int typeIndex) const
|
||||
@@ -129,7 +129,7 @@ QVariantMap QmlProfilerTimelineModel::locationFromTypeId(int index) const
|
||||
if (id >= types.length())
|
||||
return result;
|
||||
|
||||
const QmlEventLocation &location = types.at(id).location;
|
||||
QmlEventLocation location = types.at(id).location();
|
||||
|
||||
result.insert(QStringLiteral("file"), location.filename());
|
||||
result.insert(QStringLiteral("line"), location.line());
|
||||
|
||||
Reference in New Issue
Block a user