From 459ea868b6e9cbe1be4f7cdaf530fa19c61c336e Mon Sep 17 00:00:00 2001 From: silverqx Date: Mon, 5 Aug 2024 13:48:50 +0200 Subject: [PATCH] tests fixed Clazy warning --- .../collection_relations/tst_collection_relations.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/functional/orm/tiny/collection_relations/tst_collection_relations.cpp b/tests/auto/functional/orm/tiny/collection_relations/tst_collection_relations.cpp index e5d1b0932..c86fb4816 100644 --- a/tests/auto/functional/orm/tiny/collection_relations/tst_collection_relations.cpp +++ b/tests/auto/functional/orm/tiny/collection_relations/tst_collection_relations.cpp @@ -2654,7 +2654,7 @@ void tst_Collection_Relations::fresh_QList_WithItem() const ModelsCollection imagesInit = images.toPointers(); // Verify before - for (auto *const image : imagesInit) { + for (auto *const image : std::as_const(imagesInit)) { QVERIFY(image->getRelations().empty()); const auto nameRef = (*image)[NAME]; @@ -2718,7 +2718,7 @@ void tst_Collection_Relations::fresh_WithSelectConstraint() const ModelsCollection imagesInit = images.toPointers(); // Verify before - for (auto *const image : imagesInit) { + for (auto *const image : std::as_const(imagesInit)) { QVERIFY(image->getRelations().empty()); const auto nameRef = (*image)[NAME]; @@ -2779,7 +2779,7 @@ void tst_Collection_Relations::fresh_QString() const ModelsCollection imagesInit = images.toPointers(); // Verify before - for (auto *const image : imagesInit) { + for (auto *const image : std::as_const(imagesInit)) { QVERIFY(image->getRelations().empty()); const auto nameRef = (*image)[NAME]; @@ -2837,7 +2837,7 @@ void tst_Collection_Relations::fresh_EmptyRelations() const ModelsCollection imagesInit = images.toPointers(); // Verify before - for (auto *const image : imagesInit) { + for (auto *const image : std::as_const(imagesInit)) { QVERIFY(image->getRelations().empty()); const auto nameRef = (*image)[NAME];