forked from qt-creator/qt-creator
QmlProfiler: show binding types
Change-Id: Iea469aa3e0fb7c4e5146163f049c930df6fc2b7d Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
committed by
Kai Koehne
parent
c4f67a3840
commit
2afa559c2a
@@ -293,8 +293,8 @@ void QmlProfilerDataModel::clear()
|
||||
setState(Empty);
|
||||
}
|
||||
|
||||
void QmlProfilerDataModel::addRangedEvent(int type, qint64 startTime, qint64 length,
|
||||
const QStringList &data,
|
||||
void QmlProfilerDataModel::addRangedEvent(int type, int bindingType, qint64 startTime,
|
||||
qint64 length, const QStringList &data,
|
||||
const QmlDebug::QmlEventLocation &location)
|
||||
{
|
||||
const QChar colon = QLatin1Char(':');
|
||||
@@ -346,6 +346,7 @@ void QmlProfilerDataModel::addRangedEvent(int type, qint64 startTime, qint64 len
|
||||
newEvent->eventHashStr = eventHashStr;
|
||||
newEvent->eventType = (QmlDebug::QmlEventType)type;
|
||||
newEvent->details = details;
|
||||
newEvent->bindingType = bindingType;
|
||||
d->rangeEventDictionary.insert(eventHashStr, newEvent);
|
||||
}
|
||||
|
||||
@@ -1367,6 +1368,8 @@ bool QmlProfilerDataModel::save(const QString &filename)
|
||||
stream.writeTextElement("column", QString::number(eventData->location.column));
|
||||
}
|
||||
stream.writeTextElement("details", eventData->details);
|
||||
if (eventData->eventType == Binding)
|
||||
stream.writeTextElement("bindingType", QString::number((int)eventData->bindingType));
|
||||
stream.writeEndElement();
|
||||
}
|
||||
stream.writeEndElement(); // eventData
|
||||
@@ -1513,6 +1516,8 @@ void QmlProfilerDataModel::load()
|
||||
if (!descriptionBuffer.value(ndx))
|
||||
descriptionBuffer[ndx] = new QmlRangeEventData;
|
||||
currentEvent = descriptionBuffer[ndx];
|
||||
// backwards compatibility: default bindingType
|
||||
currentEvent->bindingType = QmlBinding;
|
||||
} else {
|
||||
currentEvent = 0;
|
||||
}
|
||||
@@ -1551,6 +1556,10 @@ void QmlProfilerDataModel::load()
|
||||
currentEvent->details = readData;
|
||||
break;
|
||||
}
|
||||
if (elementName == "bindingType") {
|
||||
currentEvent->bindingType = readData.toInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user