aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerapplication.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/qmlprofiler/qmlprofilerapplication.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/qmlprofiler/qmlprofilerapplication.cpp')
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index 45c32487a2..033492b516 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -274,8 +274,8 @@ quint64 QmlProfilerApplication::parseFeatures(const QStringList &featureList, co
bool exclude)
{
quint64 features = exclude ? std::numeric_limits<quint64>::max() : 0;
- QStringList givenFeatures = values.split(QLatin1Char(','));
- foreach (const QString &f, givenFeatures) {
+ const QStringList givenFeatures = values.split(QLatin1Char(','));
+ for (const QString &f : givenFeatures) {
int index = featureList.indexOf(f);
if (index < 0) {
logError(tr("Unknown feature '%1'").arg(f));