diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-11 13:08:00 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-20 06:52:34 +0000 |
commit | 3ef4fac9ff3f785d3ccbda4b28ec2c0ea2ee1b59 (patch) | |
tree | 2f832329d0b76f3b524470af0f97b3bba45ff8d1 /tools/qmlprofiler/qmlprofilerdata.cpp | |
parent | c754b71eb4a141536dfb3e6697fbd089f4cba8e9 (diff) |
tools: replace 'foreach' with 'range for'
Mark some local variables or parameters as const
to prevent detach()'ing.
Use qAsConst where is not possible mark as const.
Change-Id: I0a777c3bd855abd3bb1ad0907152360cf4a1050e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tools/qmlprofiler/qmlprofilerdata.cpp')
-rw-r--r-- | tools/qmlprofiler/qmlprofilerdata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp index b651b2724f..048c92bb93 100644 --- a/tools/qmlprofiler/qmlprofilerdata.cpp +++ b/tools/qmlprofiler/qmlprofilerdata.cpp @@ -572,7 +572,7 @@ bool QmlProfilerData::save(const QString &filename) stream.writeEndElement(); // eventData stream.writeStartElement(QStringLiteral("profilerDataModel")); - foreach (const QmlRangeEventStartInstance &event, d->startInstanceList) { + for (const QmlRangeEventStartInstance &event : qAsConst(d->startInstanceList)) { stream.writeStartElement(QStringLiteral("range")); stream.writeAttribute(QStringLiteral("startTime"), QString::number(event.startTime)); if (event.duration >= 0) |