summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-07-04 10:15:15 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-07-18 19:41:11 +0000
commit73b77bc51213525bc47d2d73e516207614b950f0 (patch)
treefffeefe5ecf29546532eea70357d756259087b8d /tools
parentf21df860fcc97fe47334d0f8d4675d515987cc8a (diff)
downloadqtdeclarative-73b77bc51213525bc47d2d73e516207614b950f0.tar.gz
qtdeclarative-73b77bc51213525bc47d2d73e516207614b950f0.tar.bz2
qtdeclarative-73b77bc51213525bc47d2d73e516207614b950f0.zip
Use by-ref in foreach when T is large or non-trivial
Change-Id: I79271fdc3fa064e362dfaa64ff11d8a4c6b7e8c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlimportscanner/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index beb47e43c..777ee1fdc 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -199,7 +199,7 @@ QVariantList findPathsForModuleImports(const QVariantList &imports)
import[QStringLiteral("classname")] = classnames;
if (plugininfo.contains(QStringLiteral("dependencies"))) {
QStringList dependencies = plugininfo.value(QStringLiteral("dependencies")).toStringList();
- foreach (QString line, dependencies) {
+ foreach (const QString &line, dependencies) {
QList<QString> dep = line.split(QStringLiteral(" "));
QVariantMap depImport;
depImport[QStringLiteral("type")] = QStringLiteral("module");