diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp index 9b31bf88dbb..ce0c683f2d6 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp @@ -541,23 +541,11 @@ void tst_GraphicsViewBenchmark::update_data() QTest::addColumn("subtreeCache"); QTest::addColumn("rotationAngle"); - QList listTypes; - listTypes << Simple << Recycling; - - QList listSizes; - listSizes << 10 << 50 << 500; - - QList themes; - themes << Theme::Blue << Theme::Lime; - - QList rotationAngles; - rotationAngles << 0 << 90; - // Generate rows: - foreach (ListType listType, listTypes) { - foreach (int listSize, listSizes) { - foreach (int angle, rotationAngles) { - foreach (Theme::Themes theme, themes) { + for (ListType listType : {Simple, Recycling}) { + for (int listSize : {10, 50, 500}) { + for (int angle : {0, 90}) { + for (Theme::Themes theme : {Theme::Blue, Theme::Lime}) { for (int toImage = 0; toImage < 2; ++toImage) { for (int cache = 0; cache < 2; ++cache) { QString string = rowString(listSize, listType, theme, toImage, cache, angle); @@ -613,27 +601,12 @@ void tst_GraphicsViewBenchmark::scroll_data() QTest::addColumn("rotationAngle"); QTest::addColumn("scrollStep"); - QList listTypes; - listTypes << Simple << Recycling; - - QList listSizes; - listSizes << 10 << 50 << 500; - - QList themes; - themes << Theme::Blue << Theme::Lime; - - QList rotationAngles; - rotationAngles << 0 << 90; - - QList scrollSteps; - scrollSteps << Slow << Normal << Fast; - // Generate rows: - foreach (ListType listType, listTypes) { - foreach (int listSize, listSizes) { - foreach (int angle, rotationAngles) { - foreach (ScrollStep step, scrollSteps) { - foreach (Theme::Themes theme, themes) { + for (ListType listType : {Simple, Recycling}) { + for (int listSize : {10, 50, 500}) { + for (int angle : {0, 90}) { + for (ScrollStep step : {Slow, Normal, Fast}) { + for (Theme::Themes theme : {Theme::Blue, Theme::Lime}) { for (int cache = 0; cache < 2; ++cache) { QString string = rowString(listSize, listType, theme, cache, angle, step); QTest::newRow(string.toLatin1()) << listSize << listType << theme