QmlProfiler: Fix the naming scheme for events and event types

Move them out of the QmlProfilerDataModel class, drop the "Data"
suffix, and rename symbols that refer to them in order to call them by
their names.

Change-Id: I41151359921b325edb79111371083c4185bd148b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-04-26 11:50:59 +02:00
parent 08f807a134
commit a955537132
28 changed files with 540 additions and 452 deletions

View File

@@ -82,7 +82,7 @@ QVariantMap MemoryUsageModel::location(int index) const
int originType = m_data[index].originTypeIndex;
if (originType > -1) {
const QmlEventLocation &location =
modelManager()->qmlModel()->getEventTypes().at(originType).location;
modelManager()->qmlModel()->eventTypes().at(originType).location;
result.insert(file, location.filename);
result.insert(line, location.line);
@@ -132,7 +132,7 @@ QVariantMap MemoryUsageModel::details(int index) const
if (ev->originTypeIndex != -1) {
result.insert(tr("Location"),
modelManager()->qmlModel()->getEventTypes().at(ev->originTypeIndex).displayName);
modelManager()->qmlModel()->eventTypes().at(ev->originTypeIndex).displayName);
}
return result;
}
@@ -159,9 +159,9 @@ void MemoryUsageModel::loadData()
QStack<RangeStackFrame> rangeStack;
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = simpleModel->getEventTypes();
foreach (const QmlProfilerDataModel::QmlEventData &event, simpleModel->getEvents()) {
const QmlProfilerDataModel::QmlEventTypeData &type = types[event.typeIndex()];
const QVector<QmlEventType> &types = simpleModel->eventTypes();
foreach (const QmlEvent &event, simpleModel->events()) {
const QmlEventType &type = types[event.typeIndex()];
while (!rangeStack.empty() && rangeStack.top().endTime < event.startTime())
rangeStack.pop();
if (!accepted(type)) {
@@ -218,7 +218,7 @@ void MemoryUsageModel::loadData()
}
}
updateProgress(count(), simpleModel->getEvents().count());
updateProgress(count(), simpleModel->events().count());
}
if (currentJSHeapIndex != -1)