Commit 0014b8bd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port foreach

parent 798e2692
Pipeline #82410 passed with stage
in 8 minutes and 29 seconds
...@@ -111,7 +111,8 @@ void FilterActionTest::testMassModifyItems() ...@@ -111,7 +111,8 @@ void FilterActionTest::testMassModifyItems()
fjob->fetchScope().fetchAllAttributes(); fjob->fetchScope().fetchAllAttributes();
AKVERIFYEXEC(fjob); AKVERIFYEXEC(fjob);
QCOMPARE(fjob->items().count(), 10); QCOMPARE(fjob->items().count(), 10);
foreach (const Item &item, fjob->items()) { const auto fJobItems{fjob->items()};
for (const Item &item : fJobItems) {
QVERIFY(item.hasAttribute<TestAttribute>()); QVERIFY(item.hasAttribute<TestAttribute>());
const QByteArray data = item.attribute<TestAttribute>()->data; const QByteArray data = item.attribute<TestAttribute>()->data;
if (data == unacceptable) { if (data == unacceptable) {
...@@ -145,7 +146,8 @@ void FilterActionTest::testMassModifyCollection() ...@@ -145,7 +146,8 @@ void FilterActionTest::testMassModifyCollection()
fjob->fetchScope().fetchAllAttributes(); fjob->fetchScope().fetchAllAttributes();
AKVERIFYEXEC(fjob); AKVERIFYEXEC(fjob);
QCOMPARE(fjob->items().count(), 10); QCOMPARE(fjob->items().count(), 10);
foreach (const Item &item, fjob->items()) { const auto fjobItems{fjob->items()};
for (const Item &item : fjobItems) {
QVERIFY(item.hasAttribute<TestAttribute>()); QVERIFY(item.hasAttribute<TestAttribute>());
const QByteArray data = item.attribute<TestAttribute>()->data; const QByteArray data = item.attribute<TestAttribute>()->data;
if (data == unacceptable) { if (data == unacceptable) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment