aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump/qmlstreamwriter.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-11 13:08:00 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-20 06:52:34 +0000
commit3ef4fac9ff3f785d3ccbda4b28ec2c0ea2ee1b59 (patch)
tree2f832329d0b76f3b524470af0f97b3bba45ff8d1 /tools/qmlplugindump/qmlstreamwriter.cpp
parentc754b71eb4a141536dfb3e6697fbd089f4cba8e9 (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/qmlplugindump/qmlstreamwriter.cpp')
-rw-r--r--tools/qmlplugindump/qmlstreamwriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlplugindump/qmlstreamwriter.cpp b/tools/qmlplugindump/qmlstreamwriter.cpp
index dd3c188fe4..3632cee60d 100644
--- a/tools/qmlplugindump/qmlstreamwriter.cpp
+++ b/tools/qmlplugindump/qmlstreamwriter.cpp
@@ -179,7 +179,7 @@ void QmlStreamWriter::flushPotentialLinesWithNewlines()
{
if (m_maybeOneline)
m_stream->write("\n");
- foreach (const QByteArray &line, m_pendingLines) {
+ for (const QByteArray &line : qAsConst(m_pendingLines)) {
writeIndent();
m_stream->write(line);
m_stream->write("\n");