From 7dc1e2031f7381500292d98f9acff6e9a33cfbf4 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 30 Jan 2023 09:51:11 +0200 Subject: [PATCH] MarketPlace: Avoid needless copy Reported by Coverity. Change-Id: Ied6f7f6cd8cf295ea39ee813e38cf19585c9dcc2 Reviewed-by: Christian Stenger --- src/plugins/marketplace/productlistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/marketplace/productlistmodel.cpp b/src/plugins/marketplace/productlistmodel.cpp index e4f7e12edce..cdfb8d79e5f 100644 --- a/src/plugins/marketplace/productlistmodel.cpp +++ b/src/plugins/marketplace/productlistmodel.cpp @@ -173,7 +173,7 @@ void SectionedProducts::onFetchSingleCollectionFinished(QNetworkReply *reply) product->handle = handle; const QJsonArray tags = obj.value("tags").toArray(); - for (auto val : tags) + for (const auto &val : tags) product->tags.append(val.toString()); const auto images = obj.value("images").toArray();