aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-09-24 15:44:21 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-09-25 09:35:17 +0000
commit2f0fa786342ff1435f86bbde34746fbe71379880 (patch)
treea22f35fc4f7a6d4dcad8fdcdb0d5065fb6b36ffa /tests/auto/blackbox/tst_blackbox.cpp
parent82020280ac9a4f9082c4390a30d41473cf401c39 (diff)
xcode12: fix compiler warnings
Clang says: "loop variable 'xxx' is always a copy because the range of type 'QJsonArray' does not return a reference [-Wrange-loop-analysis]" Change-Id: Ibb33f077dfaaf635300f6c75f6684d4a3d7632de Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index d25212a66..706a2d297 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -937,7 +937,7 @@ void TestBlackbox::dependenciesProperty()
QJsonArray cpp_dependencies = product2_cpp.value("dependencies").toArray();
QVERIFY(!cpp_dependencies.isEmpty());
int qbsCount = 0;
- for (const auto &dep : cpp_dependencies) {
+ for (const auto dep : cpp_dependencies) {
if (dep.toObject().value("name").toString() == "qbs")
++qbsCount;
}
@@ -6310,7 +6310,7 @@ void TestBlackbox::qbsSession()
QCOMPARE(receivedMessage.value("type").toString(), QString("files-added"));
error = receivedMessage.value("error").toObject();
if (!error.isEmpty()) {
- for (const auto &item: error[QStringLiteral("items")].toArray()) {
+ for (const auto item: error[QStringLiteral("items")].toArray()) {
const auto description = QStringLiteral("Project file updates are not enabled");
if (item.toObject()[QStringLiteral("description")].toString().contains(description))
QSKIP("File updates are disabled");
@@ -6335,7 +6335,7 @@ void TestBlackbox::qbsSession()
QJsonArray products = projectData.value("products").toArray();
bool file1 = false;
bool file2 = false;
- for (const QJsonValue &v : products) {
+ for (const QJsonValue v : products) {
const QJsonObject product = v.toObject();
const QString productName = product.value("full-display-name").toString();
const QJsonArray groups = product.value("groups").toArray();
@@ -6437,7 +6437,7 @@ void TestBlackbox::qbsSession()
QJsonArray products = projectData.value("products").toArray();
bool file1 = false;
bool file2 = false;
- for (const QJsonValue &v : products) {
+ for (const QJsonValue v : products) {
const QJsonObject product = v.toObject();
const QString productName = product.value("full-display-name").toString();
const QJsonArray groups = product.value("groups").toArray();