forked from qt-creator/qt-creator
QmlProfiler: Avoid structs with default values
gcc 4.9 and msvc 2015 choke when creating those from initializer lists. Change-Id: I85936fe33418d5d9ffeb3c910392ad43fbb9a9bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Ulf Hermann
parent
1155601da5
commit
c637c66ebb
@@ -370,7 +370,7 @@ void QmlProfilerStatisticsRelativesModel::loadEvent(RangeType type, const QmlEve
|
||||
|
||||
switch (event.rangeStage()) {
|
||||
case RangeStart:
|
||||
stack.push({event.timestamp(), event.typeIndex()});
|
||||
stack.push(Frame(event.timestamp(), event.typeIndex()));
|
||||
break;
|
||||
case RangeEnd: {
|
||||
int callerTypeIndex = stack.count() > 1 ? stack[stack.count() - 2].typeId : -1;
|
||||
@@ -386,12 +386,8 @@ void QmlProfilerStatisticsRelativesModel::loadEvent(RangeType type, const QmlEve
|
||||
it->duration += event.timestamp() - stack.top().startTime;
|
||||
it->isRecursive = isRecursive || it->isRecursive;
|
||||
} else {
|
||||
QmlStatisticsRelativesData relative = {
|
||||
event.timestamp() - stack.top().startTime,
|
||||
1,
|
||||
isRecursive
|
||||
};
|
||||
relativesMap.insert(relativeTypeIndex, relative);
|
||||
relativesMap.insert(relativeTypeIndex, QmlStatisticsRelativesData(
|
||||
event.timestamp() - stack.top().startTime, 1, isRecursive));
|
||||
}
|
||||
stack.pop();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user