QmlProfiler: Rename QmlEvent::startTime to "timestamp"

As many events are instantaneous and we're going to drop the duration
property soon, this is more fitting.

Change-Id: I6e13dd076a5b9df16aed44bf9f631ea5760e9cbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-04-28 15:40:02 +02:00
parent a53780924d
commit 215c0533d2
12 changed files with 55 additions and 56 deletions

View File

@@ -369,7 +369,7 @@ void QmlProfilerFileReader::loadEvents(QXmlStreamReader &stream)
continue;
}
event.setStartTime(attributes.value(_("startTime")).toLongLong());
event.setTimestamp(attributes.value(_("startTime")).toLongLong());
if (attributes.hasAttribute(_("duration")))
event.setDuration(attributes.value(_("duration")).toLongLong());
@@ -591,14 +591,13 @@ void QmlProfilerFileWriter::save(QIODevice *device)
const QmlEvent &event = m_events[rangeIndex];
stream.writeStartElement(_("range"));
stream.writeAttribute(_("startTime"), QString::number(event.startTime()));
stream.writeAttribute(_("startTime"), QString::number(event.timestamp()));
if (event.duration() > 0) // no need to store duration of instantaneous events
stream.writeAttribute(_("duration"), QString::number(event.duration()));
stream.writeAttribute(_("eventIndex"), QString::number(event.typeIndex()));
const QmlEventType &type = m_eventTypes[event.typeIndex()];
if (type.message == Event) {
if (type.detailType == AnimationFrame) {
// special: animation event