QmlDesigner: performance-for-range-copy

Avoid copying the loop variable on each iteration if a const reference
would suffice.

For QPointers<>, this change only adds a const.

Change-Id: I5abe7d793cd46859a9a4f9304ec1bd41f899d72c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Alessandro Portale
2020-06-13 23:04:31 +02:00
parent e2670bf3e6
commit 625a35e492
13 changed files with 17 additions and 17 deletions

View File

@@ -108,7 +108,7 @@ void GenerateResource::generateMenuEntry()
const QStringList arguments1 = {"--project", "--output", temp.fileName()};
const QStringList arguments2 = {"--binary", "--output", resourceFileName, temp.fileName()};
for (auto arguments : {arguments1, arguments2}) {
for (const auto &arguments : {arguments1, arguments2}) {
rccProcess.start(rccBinary.toString(), arguments);
if (!rccProcess.waitForStarted()) {
Core::MessageManager::write(QCoreApplication::translate("QmlDesigner::GenerateResource",