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:
Ulf Hermann
2016-06-06 19:51:55 +02:00
parent 5718f12af5
commit e10bc709bc
23 changed files with 267 additions and 318 deletions

View File

@@ -207,7 +207,7 @@ void QmlProfilerStatisticsModel::notesChanged(int typeIndex)
void QmlProfilerStatisticsModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
{
if (!d->acceptedTypes.contains(type.rangeType))
if (!d->acceptedTypes.contains(type.rangeType()))
return;
switch (event.rangeStage()) {
@@ -215,7 +215,7 @@ void QmlProfilerStatisticsModel::loadEvent(const QmlEvent &event, const QmlEvent
// binding loop detection: check whether event is already in stack
for (int ii = 1; ii < d->callStack.size(); ++ii) {
if (d->callStack.at(ii).typeIndex() == event.typeIndex()
&& type.rangeType != Javascript) {
&& type.rangeType() != Javascript) {
d->eventsInBindingLoop.insert(event.typeIndex());
break;
}