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:
@@ -199,7 +199,7 @@ void CtfTraceManager::finalize()
|
||||
++it;
|
||||
}
|
||||
}
|
||||
for (CtfTimelineModel *model: m_threadModels) {
|
||||
for (CtfTimelineModel *model: qAsConst(m_threadModels)) {
|
||||
model->finalize(m_traceBegin, m_traceEnd,
|
||||
m_processNames[model->m_processId], m_threadNames[model->m_threadId]);
|
||||
}
|
||||
@@ -278,7 +278,7 @@ void CtfTraceManager::updateStatistics()
|
||||
});
|
||||
|
||||
m_statisticsModel->beginLoading();
|
||||
for (auto thread : m_threadModels) {
|
||||
for (auto thread : qAsConst(m_threadModels)) {
|
||||
if (showAll || m_threadRestrictions[thread->tid()])
|
||||
{
|
||||
const int eventCount = thread->count();
|
||||
@@ -295,7 +295,7 @@ void CtfTraceManager::updateStatistics()
|
||||
void CtfTraceManager::clearAll()
|
||||
{
|
||||
m_modelAggregator->clear();
|
||||
for (CtfTimelineModel *model: m_threadModels) {
|
||||
for (CtfTimelineModel *model: qAsConst(m_threadModels)) {
|
||||
model->deleteLater();
|
||||
}
|
||||
m_threadModels.clear();
|
||||
|
||||
Reference in New Issue
Block a user