aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
diff options
context:
space:
mode:
authorChristian Stenger <[email protected]>2018-04-12 12:08:48 +0200
committerUlf Hermann <[email protected]>2018-04-12 10:30:13 +0000
commitc637c66ebb06eaec1fff5ec94402d27a55b63dd8 (patch)
tree8b117844aca39b6cc0a244e5c16887e570790d8c /src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
parent1155601da5b52a48e4c6b9bedaba904e6b703e8a (diff)
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 <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
index 18c4905b8b4..f4b9c931fae 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
@@ -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;