diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-09-24 15:44:21 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-09-25 09:35:17 +0000 |
commit | 2f0fa786342ff1435f86bbde34746fbe71379880 (patch) | |
tree | a22f35fc4f7a6d4dcad8fdcdb0d5065fb6b36ffa /tests/auto/blackbox | |
parent | 82020280ac9a4f9082c4390a30d41473cf401c39 (diff) | |
download | qbs-2f0fa786342ff1435f86bbde34746fbe71379880.tar.gz |
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')
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 8 |
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(); |