QmlProfiler: Allow string data in events

The restriction to put all strings in the type data is becoming a
burden to further enhancements. Also, introduce proper ctors for all
event structs.

Change-Id: I42d3bac96155ac1ac183a2b82785ce0396c5a932
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-11-13 15:31:32 +01:00
parent 8d936b8aa6
commit 35cedb2aee
6 changed files with 250 additions and 111 deletions

View File

@@ -80,12 +80,12 @@ void QmlProfilerRangeModel::loadData()
const QVector<QmlProfilerDataModel::QmlEventData> &eventList = simpleModel->getEvents();
const QVector<QmlProfilerDataModel::QmlEventTypeData> &typesList = simpleModel->getEventTypes();
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
const QmlProfilerDataModel::QmlEventTypeData &type = typesList[event.typeIndex];
const QmlProfilerDataModel::QmlEventTypeData &type = typesList[event.typeIndex()];
if (!accepted(type))
continue;
// store starttime-based instance
m_data.insert(insert(event.startTime, event.duration, event.typeIndex),
m_data.insert(insert(event.startTime(), event.duration(), event.typeIndex()),
QmlRangeEventStartInstance());
updateProgress(count(), eventList.count() * 5);
}