forked from qt-creator/qt-creator
Use qAsConst with non-const Qt containers in range-loops
... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -140,7 +140,7 @@ void FlameGraphModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
|
||||
|
||||
void FlameGraphModel::finalize()
|
||||
{
|
||||
for (FlameGraphData *child : m_stackBottom.children)
|
||||
for (FlameGraphData *child : qAsConst(m_stackBottom.children))
|
||||
m_stackBottom.duration += child->duration;
|
||||
|
||||
loadNotes(-1, false);
|
||||
|
||||
@@ -405,7 +405,7 @@ QmlProfilerModelManager::rangeFilter(qint64 rangeStart, qint64 rangeEnd) const
|
||||
}
|
||||
} else {
|
||||
if (!crossedRangeStart) {
|
||||
for (auto stashed : stack) {
|
||||
for (auto stashed : qAsConst(stack)) {
|
||||
stashed.setTimestamp(rangeStart);
|
||||
loader(stashed, eventType(stashed.typeIndex()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user