diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-06 11:30:50 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-07 23:38:56 +0200 |
commit | c2d490a2385ea6f389340a296acaac0fa198c8b9 (patch) | |
tree | 5bc4dc681c9a9501cb9b2f39b8a1ab6e3d76ccfd /tests/auto | |
parent | 958cd3ee1094a068b6d0ff27c73a4b3caff088ad (diff) |
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto')
39 files changed, 78 insertions, 78 deletions
diff --git a/tests/auto/particles/qquickage/tst_qquickage.cpp b/tests/auto/particles/qquickage/tst_qquickage.cpp index b0a41afb45..21b79d8921 100644 --- a/tests/auto/particles/qquickage/tst_qquickage.cpp +++ b/tests/auto/particles/qquickage/tst_qquickage.cpp @@ -35,7 +35,7 @@ void tst_qquickage::test_kill() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -60,7 +60,7 @@ void tst_qquickage::test_jump() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -86,7 +86,7 @@ void tst_qquickage::test_onceOff() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -112,7 +112,7 @@ void tst_qquickage::test_sustained() //TODO: Ensure some particles have lived to 0.4s point despite unified timer //Can't verify size, because particles never die. It will constantly grow. - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp index 63f77f3b30..8b2cb417cb 100644 --- a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp +++ b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp @@ -32,7 +32,7 @@ void tst_qquickangleddirection::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp index 9e1a95863d..df427600c5 100644 --- a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp +++ b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp @@ -31,7 +31,7 @@ void tst_qquickcumulativedirection::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp index c38bc1cdd8..e10885cf84 100644 --- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp +++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp @@ -33,7 +33,7 @@ void tst_qquickcustomaffector::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused //in CI the whole simulation often happens at once, so dead particles end up missing out @@ -66,7 +66,7 @@ void tst_qquickcustomaffector::test_move() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused if (!d->stillAlive(system)) diff --git a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp index 9912e54eec..98139e8271 100644 --- a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp +++ b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp @@ -48,7 +48,7 @@ void tst_qquickellipseextruder::test_basic() //Filled QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -65,7 +65,7 @@ void tst_qquickellipseextruder::test_basic() //Just border QCOMPARE(system->groupData[1]->size(), 500); - for (QQuickParticleData *d : qAsConst(system->groupData[1]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[1]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp index 94e2b67ac2..edc3770f85 100644 --- a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp +++ b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp @@ -33,7 +33,7 @@ void tst_qquickfriction::test_basic() //Default is just slowed a little QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -50,7 +50,7 @@ void tst_qquickfriction::test_basic() //Nondefault comes to a complete stop within the first half of its life QCOMPARE(system->groupData[1]->size(), 500); - for (QQuickParticleData *d : qAsConst(system->groupData[1]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[1]->data)) { if (d->t == -1) continue; //Particle data unused @@ -77,7 +77,7 @@ void tst_qquickfriction::test_threshold() //Velocity capped at 50, but it might take a frame or two to get there QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1.0f) continue; //Particle data unused if (myFuzzyGEQ(d->t, ((qreal)system->timeInt/1000.0) - 0.1)) diff --git a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp index 772eabba55..d95bb19827 100644 --- a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp +++ b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp @@ -32,7 +32,7 @@ void tst_qquickgravity::test_basic() QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); float mag = 707.10678f; - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1 || !d->stillAlive(system)) continue; //Particle data unused or dead diff --git a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp index 6d91ed149c..87a0c9f21e 100644 --- a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp +++ b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp @@ -32,7 +32,7 @@ void tst_qquickgroupgoal::test_instantTransition() ensureAnimTime(600, system->m_animation); QVERIFY(system->groupData[0]->size() <= 500 && system->groupData[0]->size() >= 450); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp index 87335172ce..826314e79f 100644 --- a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp +++ b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp @@ -45,7 +45,7 @@ void tst_qquickimageparticle::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -89,7 +89,7 @@ void tst_qquickimageparticle::test_colored() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -133,7 +133,7 @@ void tst_qquickimageparticle::test_colorVariance() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -178,7 +178,7 @@ void tst_qquickimageparticle::test_deformed() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -222,7 +222,7 @@ void tst_qquickimageparticle::test_tabled() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -267,7 +267,7 @@ void tst_qquickimageparticle::test_sprite() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp index 24b87bad41..8e82f91a92 100644 --- a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp +++ b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp @@ -38,7 +38,7 @@ void tst_qquickitemparticle::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -119,7 +119,7 @@ void tst_qquickitemparticle::test_noLeakWhenDeleted() QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(100, system->m_animation); - auto particles = qAsConst(system->groupData[0]->data); + auto particles = std::as_const(system->groupData[0]->data); QVERIFY(!particles.isEmpty()); QQuickParticleData* firstParticleData = particles.first(); diff --git a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp index 81c7462f54..98e300d90a 100644 --- a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp +++ b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp @@ -31,7 +31,7 @@ void tst_qquicklineextruder::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -47,7 +47,7 @@ void tst_qquicklineextruder::test_basic() } QCOMPARE(system->groupData[1]->size(), 500); - for (QQuickParticleData *d : qAsConst(system->groupData[1]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[1]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp index faa3d0732a..6c4bb44a07 100644 --- a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp +++ b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp @@ -31,7 +31,7 @@ void tst_qquickmaskextruder::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp index 0a6ba45be7..75c2e72c34 100644 --- a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp +++ b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp @@ -32,7 +32,7 @@ void tst_qquickparticlegroup::test_instantTransition() //A frame or two worth of particles will be missed, the transition doesn't take effect on the frame it's spawned (QTBUG-21781) QVERIFY(system->groupData[0]->size() <= 500 && system->groupData[0]->size() >= 450); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp index 0a22f86fc3..cadeac66f5 100644 --- a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp +++ b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp @@ -33,7 +33,7 @@ void tst_qquickparticlesystem::test_basic() QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); int stillAlive = 0; - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp index 04bd52bee0..e5822c1b88 100644 --- a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp +++ b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp @@ -31,7 +31,7 @@ void tst_qquickpointattractor::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp index 441e2663b1..8c39bad812 100644 --- a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp +++ b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp @@ -31,7 +31,7 @@ void tst_qquickpointdirection::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp index c40d57704d..99cbeba35a 100644 --- a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp +++ b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp @@ -31,7 +31,7 @@ void tst_qquickrectangleextruder::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -50,7 +50,7 @@ void tst_qquickrectangleextruder::test_basic() } QCOMPARE(system->groupData[1]->size(), 500); - for (QQuickParticleData *d : qAsConst(system->groupData[1]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[1]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp index c349456790..4dd965aff7 100644 --- a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp +++ b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp @@ -31,7 +31,7 @@ void tst_qquickspritegoal::test_instantTransition() ensureAnimTime(600, system->m_animation); QVERIFY(system->groupData[0]->size() <= 500 && system->groupData[0]->size() >= 450); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp index 013612d277..6e695440a0 100644 --- a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp +++ b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp @@ -31,7 +31,7 @@ void tst_qquicktargetdirection::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp index ef5a513b2f..230c666c8d 100644 --- a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp +++ b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp @@ -31,7 +31,7 @@ void tst_qquicktrailemitter::test_basic() ensureAnimTime(600, system->m_animation); QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused @@ -48,7 +48,7 @@ void tst_qquicktrailemitter::test_basic() } QVERIFY(extremelyFuzzyCompare(system->groupData[1]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[1]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[1]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp index 246dba20fe..d90dd17199 100644 --- a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp +++ b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp @@ -33,7 +33,7 @@ void tst_qquickturbulence::test_basic() //Note that the noise image built-in provides the 'randomness', so this test should be stable so long as it and the size //of the Turbulence item remain the same QVERIFY(extremelyFuzzyCompare(system->groupData[0]->size(), 500, 10)); - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/particles/qquickwander/tst_qquickwander.cpp b/tests/auto/particles/qquickwander/tst_qquickwander.cpp index 6f056f5760..71a8ee1f97 100644 --- a/tests/auto/particles/qquickwander/tst_qquickwander.cpp +++ b/tests/auto/particles/qquickwander/tst_qquickwander.cpp @@ -35,7 +35,7 @@ void tst_qquickwander::test_basic() //the 500 was randomly changed from 0.0 in velocity bool vxChanged = false; bool vyChanged = false; - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 5a8fce6424..ab599e9a23 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -150,7 +150,7 @@ void tst_QQmlDebuggingEnabler::custom() m_clients = QQmlDebugTest::createOtherClients(m_connection); m_connection->connectToHost("127.0.0.1", m_process->debugPort()); QVERIFY(m_connection->waitForConnected()); - for (QQmlDebugClient *client : qAsConst(m_clients)) + for (QQmlDebugClient *client : std::as_const(m_clients)) QCOMPARE(client->state(), (services.isEmpty() || services.contains(client->name())) ? QQmlDebugClient::Enabled : QQmlDebugClient::Unavailable); } diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 2e457cad8f..dfe92bb80b 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -469,32 +469,32 @@ void tst_QQmlProfilerService::cleanup() if (m_client && QTest::currentTestFailed()) { qDebug() << "QML Messages:" << m_client->qmlMessages.size(); int i = 0; - for (const QQmlProfilerEvent &data : qAsConst(m_client->qmlMessages)) + for (const QQmlProfilerEvent &data : std::as_const(m_client->qmlMessages)) log(data, i++); qDebug() << " "; qDebug() << "JavaScript Messages:" << m_client->javascriptMessages.size(); i = 0; - for (const QQmlProfilerEvent &data : qAsConst(m_client->javascriptMessages)) + for (const QQmlProfilerEvent &data : std::as_const(m_client->javascriptMessages)) log(data, i++); qDebug() << " "; qDebug() << "Asynchronous Messages:" << m_client->asynchronousMessages.size(); i = 0; - for (const QQmlProfilerEvent &data : qAsConst(m_client->asynchronousMessages)) + for (const QQmlProfilerEvent &data : std::as_const(m_client->asynchronousMessages)) log(data, i++); qDebug() << " "; qDebug() << "Pixmap Cache Messages:" << m_client->pixmapMessages.size(); i = 0; - for (const QQmlProfilerEvent &data : qAsConst(m_client->pixmapMessages)) + for (const QQmlProfilerEvent &data : std::as_const(m_client->pixmapMessages)) log(data, i++); qDebug() << " "; qDebug() << "Javascript Heap Messages:" << m_client->jsHeapMessages.size(); i = 0; - for (const QQmlProfilerEvent &data : qAsConst(m_client->jsHeapMessages)) + for (const QQmlProfilerEvent &data : std::as_const(m_client->jsHeapMessages)) log(data, i++); qDebug() << " "; diff --git a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp index 79f27aee9c..f50b390fa9 100644 --- a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp +++ b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp @@ -181,17 +181,17 @@ bool Test262Runner::report() } if (!crashes.isEmpty()) { qDebug() << " Encountered" << crashes.size() << "crashes in the following files:"; - for (const QString &f : qAsConst(crashes)) + for (const QString &f : std::as_const(crashes)) qDebug() << " " << f; } if (!unexpectedFailures.isEmpty()) { qDebug() << " Encountered" << unexpectedFailures.size() << "unexpected failures in the following files:"; - for (const QString &f : qAsConst(unexpectedFailures)) + for (const QString &f : std::as_const(unexpectedFailures)) qDebug() << " " << f; } if (!unexpectedPasses.isEmpty()) { qDebug() << " Encountered" << unexpectedPasses.size() << "unexpected passes in the following files:"; - for (const QString &f : qAsConst(unexpectedPasses)) + for (const QString &f : std::as_const(unexpectedPasses)) qDebug() << " " << f; } return crashes.isEmpty() && unexpectedFailures.isEmpty() && unexpectedPasses.isEmpty(); @@ -464,7 +464,7 @@ void Test262Runner::writeTestExpectations() QTemporaryFile expectations; expectations.open(); - for (auto c : qAsConst(testCases)) { + for (auto c : std::as_const(testCases)) { TestExpectationLine line = TestExpectationLine::fromTestCase(c); expectations.write(line.toLine()); } @@ -709,7 +709,7 @@ TestData Test262Runner::getTestData(const TestCase &testCase) data.harness += harness("assert.js"); data.harness += harness("sta.js"); - for (QByteArray inc : qAsConst(data.includes)) { + for (QByteArray inc : std::as_const(data.includes)) { inc = inc.trimmed(); data.harness += harness(inc); } diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 9fa617bcc7..2a853ae081 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -4483,7 +4483,7 @@ void tst_qqmlecmascript::singletonType() if (!errorMessage.isEmpty()) QTest::ignoreMessage(QtWarningMsg, errorMessage.toLatin1().constData()); - for (const QString &warning : qAsConst(warningMessages)) + for (const QString &warning : std::as_const(warningMessages)) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); QScopedPointer<QObject> object(component.create()); @@ -4840,7 +4840,7 @@ void tst_qqmlecmascript::importScripts() QTest::ignoreMessage(QtWarningMsg, errorMessage.toLatin1().constData()); if (compilationShouldSucceed) { - for (const QString &warning : qAsConst(warningMessages)) + for (const QString &warning : std::as_const(warningMessages)) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); } diff --git a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp index a935f9f70d..9c3eb66a60 100644 --- a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp +++ b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp @@ -578,7 +578,7 @@ void tst_qqmljsscope::scriptIndices() queue.push_back(c); } - for (const QmlIR::Object *irObject : qAsConst(document.objects)) { + for (const QmlIR::Object *irObject : std::as_const(document.objects)) { const QString objectName = document.stringAt(irObject->inheritedTypeNameIndex); for (auto it = irObject->functionsBegin(); it != irObject->functionsEnd(); ++it) { QString name = document.stringAt(it->nameIndex); diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index f8367acd49..adad96b864 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -550,7 +550,7 @@ void tst_qqmlparser::typeAnnotations_data() QStringList files; files << findFiles(QDir(tests)); - for (const QString &file: qAsConst(files)) + for (const QString &file: std::as_const(files)) QTest::newRow(qPrintable(file)) << file; } @@ -590,7 +590,7 @@ void tst_qqmlparser::disallowedTypeAnnotations_data() QStringList files; files << findFiles(QDir(tests)); - for (const QString &file: qAsConst(files)) + for (const QString &file: std::as_const(files)) QTest::newRow(qPrintable(file)) << file; } @@ -679,7 +679,7 @@ void tst_qqmlparser::annotations_data() QStringList refFiles; refFiles << findFiles(QDir(compare)); - for (const QString &file: qAsConst(files)) { + for (const QString &file: std::as_const(files)) { auto fileNameStart = file.lastIndexOf(QDir::separator()); auto fileName = QStringView(file).mid(fileNameStart, file.size()-fileNameStart); auto ref=std::find_if(refFiles.constBegin(),refFiles.constEnd(), [fileName](const QString &s){ return s.endsWith(fileName); }); diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp index c3bf3b6181..220f449dfc 100644 --- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp +++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp @@ -885,7 +885,7 @@ void tst_qqmlqt::dateTimeFormattingVariants() << component.url().toString() + ":40: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed." << component.url().toString() + ":43: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed."; - for (const QString &warning : qAsConst(warnings)) + for (const QString &warning : std::as_const(warnings)) QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); warnings.clear(); @@ -899,7 +899,7 @@ void tst_qqmlqt::dateTimeFormattingVariants() << "Could not convert argument 1 at" << "expression for err_dateTime2@"; - for (const QString &warning : qAsConst(warnings)) + for (const QString &warning : std::as_const(warnings)) QTest::ignoreMessage(QtWarningMsg, QRegularExpression(warning)); warnings.clear(); diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp index 43b86144f6..89e208f441 100644 --- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp +++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp @@ -129,10 +129,10 @@ void tst_QQMLTypeLoader::trimCache() // The cache is free to keep the others. } - for (auto *data : qAsConst(releaseCompilationUnitLater)) + for (auto *data : std::as_const(releaseCompilationUnitLater)) data->release(); - for (auto *data : qAsConst(releaseLater)) + for (auto *data : std::as_const(releaseLater)) data->release(); } diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index d1c31a080d..3127784f6a 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -223,7 +223,7 @@ void tst_examples::sgexamples_data() QStringList files; files << findQmlFiles(examplesDir); - for (const QString &file : qAsConst(files)) + for (const QString &file : std::as_const(files)) QTest::newRow(qPrintable(repoSourceDir.relativeFilePath(file))) << file; } @@ -273,7 +273,7 @@ void tst_examples::sgsnippets_data() QStringList files; files << findQmlFiles(snippetsDir); - for (const QString &file : qAsConst(files)) + for (const QString &file : std::as_const(files)) QTest::newRow(qPrintable(repoSourceDir.relativeFilePath(file))) << file; // Add Quick snippets. @@ -283,7 +283,7 @@ void tst_examples::sgsnippets_data() files.clear(); files << findQmlFiles(snippetsDir); - for (const QString &file : qAsConst(files)) + for (const QString &file : std::as_const(files)) QTest::newRow(qPrintable(repoSourceDir.relativeFilePath(file))) << file; } diff --git a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp index 4734382fc8..b8de922777 100644 --- a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp +++ b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp @@ -160,7 +160,7 @@ void tst_PropertyRequirements::testQmlType(TestDepth testDepth, const QQmlType & inheritanceHierarchy.append(qmlType.metaObject()); } - for (const QMetaObject *metaClass : qAsConst(inheritanceHierarchy)) { + for (const QMetaObject *metaClass : std::as_const(inheritanceHierarchy)) { for (int idx = metaClass->propertyOffset(); idx < metaClass->propertyCount(); ++idx) { const QMetaProperty property = metaClass->property(idx); diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 79dcc5a076..c34d55f87b 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -9872,7 +9872,7 @@ void tst_QQuickListView::reuse_checkThatItemsAreReused() QCOMPARE(listView->property("delegatesCreatedCount").toInt(), initialItemCount); // Go through all the initial items and check that they have not been reused yet - for (const auto item : qAsConst(items)) + for (const auto item : std::as_const(items)) QCOMPARE(item->property("reusedCount").toInt(), 0); // Flick one page down and count how many items we have created thus @@ -9896,7 +9896,7 @@ void tst_QQuickListView::reuse_checkThatItemsAreReused() // QML model classes, we need to catch it through a binding instead (which is // OK, since then we can also check that bindings are updated when reused). items = findItems<QQuickItem>(listView, "delegate"); - for (const auto item : qAsConst(items)) { + for (const auto item : std::as_const(items)) { const QString display = item->property("displayBinding").toString(); const int modelIndex = item->property("modelIndex").toInt(); QVERIFY(modelIndex >= initialItemCount); @@ -9918,7 +9918,7 @@ void tst_QQuickListView::reuse_checkThatItemsAreReused() // (except for ListView.currentItem, which was never released). const auto listViewCurrentItem = listView->currentItem(); items = findItems<QQuickItem>(listView, "delegate"); - for (const auto item : qAsConst(items)) { + for (const auto item : std::as_const(items)) { const int reusedCount = item->property("reusedCount").toInt(); if (item == listViewCurrentItem) QCOMPARE(reusedCount, 0); @@ -9929,7 +9929,7 @@ void tst_QQuickListView::reuse_checkThatItemsAreReused() // Go through all items again and check that all model data inside the delegate // have correct values now that they have been reused. items = findItems<QQuickItem>(listView, "delegate"); - for (const auto item : qAsConst(items)) { + for (const auto item : std::as_const(items)) { const QString display = item->property("displayBinding").toString(); const int modelIndex = item->property("modelIndex").toInt(); QVERIFY(modelIndex < initialItemCount); diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index 122ac3e029..98085002ea 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -2692,7 +2692,7 @@ void tst_QQuickPathView::objectModelMove() QVector<QString> itemObjectNames; itemObjectNames << QLatin1String("red") << QLatin1String("green") << QLatin1String("blue"); QVector<QQuickItem*> childItems; - for (const QString &itemObjectName : qAsConst(itemObjectNames)) { + for (const QString &itemObjectName : std::as_const(itemObjectNames)) { QQuickItem *childItem = findItem<QQuickItem>(pathView, itemObjectName); QVERIFY(childItem); childItems.append(childItem); @@ -2705,7 +2705,7 @@ void tst_QQuickPathView::objectModelMove() QTRY_VERIFY(pathView.isNull()); // By this point, all of its cached items should have been released, // which means none of the items should have any listeners. - for (const auto childItem : qAsConst(childItems)) { + for (const auto childItem : std::as_const(childItems)) { const QQuickItemPrivate *childItemPrivate = QQuickItemPrivate::get(childItem); QCOMPARE(childItemPrivate->changeListeners.size(), 0); } diff --git a/tests/auto/quickcontrols2/customization/tst_customization.cpp b/tests/auto/quickcontrols2/customization/tst_customization.cpp index f22af1d5b8..1ee39ae254 100644 --- a/tests/auto/quickcontrols2/customization/tst_customization.cpp +++ b/tests/auto/quickcontrols2/customization/tst_customization.cpp @@ -293,7 +293,7 @@ void tst_customization::creation() QCOMPARE(control->objectName(), controlName); QVERIFY2(qt_createdQObjects()->removeOne(controlName), qPrintable(controlName + " was not created as expected")); - for (QString delegate : qAsConst(delegates)) { + for (QString delegate : std::as_const(delegates)) { QStringList properties = delegate.split(".", Qt::SkipEmptyParts); // <control>-<delegate>-<style>(-<override>) @@ -390,7 +390,7 @@ void tst_customization::override() QCOMPARE(control->objectName(), controlName); QVERIFY2(qt_createdQObjects()->removeOne(controlName), qPrintable(controlName + " was not created as expected")); - for (QString delegate : qAsConst(delegates)) { + for (QString delegate : std::as_const(delegates)) { QStringList properties = delegate.split(".", Qt::SkipEmptyParts); // <control>-<delegate>-<style>(-override) @@ -420,7 +420,7 @@ void tst_customization::override() if (!nonDeferred.isEmpty()) { // There were items for which deferred execution was not possible. - for (QString delegateName : qAsConst(delegates)) { + for (QString delegateName : std::as_const(delegates)) { if (!delegateName.contains("-")) delegateName.append("-" + nonDeferred); delegateName.prepend(type.toLower() + "-"); diff --git a/tests/auto/quickcontrols2/focus/tst_focus.cpp b/tests/auto/quickcontrols2/focus/tst_focus.cpp index 98b2f3bd24..ca70146885 100644 --- a/tests/auto/quickcontrols2/focus/tst_focus.cpp +++ b/tests/auto/quickcontrols2/focus/tst_focus.cpp @@ -93,7 +93,7 @@ void tst_focus::navigation() QVERIFY(QTest::qWaitForWindowActive(&view)); QVERIFY(QGuiApplication::focusWindow() == &view); - for (const QString &name : qAsConst(order)) { + for (const QString &name : std::as_const(order)) { QKeyEvent event(QEvent::KeyPress, key, Qt::NoModifier); QGuiApplication::sendEvent(&view, &event); QVERIFY(event.isAccepted()); diff --git a/tests/auto/quickcontrols2/qquickiconlabel/tst_qquickiconlabel.cpp b/tests/auto/quickcontrols2/qquickiconlabel/tst_qquickiconlabel.cpp index 5aab4a0f09..8d42cf5faf 100644 --- a/tests/auto/quickcontrols2/qquickiconlabel/tst_qquickiconlabel.cpp +++ b/tests/auto/quickcontrols2/qquickiconlabel/tst_qquickiconlabel.cpp @@ -130,7 +130,7 @@ void tst_qquickiconlabel::display() // Test that the icon and text are correctly positioned and sized after // setting several different display types in succession. - for (QQuickIconLabel::Display displayType : qAsConst(displayTypes)) { + for (QQuickIconLabel::Display displayType : std::as_const(displayTypes)) { label->setDisplay(displayType); QCOMPARE(label->display(), displayType); diff --git a/tests/auto/quickdialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp b/tests/auto/quickdialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp index d2b3a2f961..ac4447402b 100644 --- a/tests/auto/quickdialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp +++ b/tests/auto/quickdialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp @@ -1047,7 +1047,7 @@ void tst_QQuickFileDialogImpl::tabFocusNavigation() } // Tab through each item, checking the focus after each. - for (auto expectedFocusItem : qAsConst(expectedFocusItems)) { + for (auto expectedFocusItem : std::as_const(expectedFocusItems)) { // Check the focus item first so that we account for the first item. // Print detailed failure message as workaround for QTBUG-92102. QVERIFY2(dialogHelper.window()->activeFocusItem() == expectedFocusItem, qPrintable(QString::fromLatin1( @@ -1062,7 +1062,7 @@ void tst_QQuickFileDialogImpl::tabFocusNavigation() std::reverse(expectedFocusItems.begin(), expectedFocusItems.end()); // We know the first (last) item has focus already, so skip it. expectedFocusItems.removeFirst(); - for (auto expectedFocusItem : qAsConst(expectedFocusItems)) { + for (auto expectedFocusItem : std::as_const(expectedFocusItems)) { QTest::keyClick(dialogHelper.window(), Qt::Key_Tab, Qt::ShiftModifier); QCOMPARE(dialogHelper.window()->activeFocusItem(), expectedFocusItem); diff --git a/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp b/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp index a4b445b50b..01116aa7e9 100644 --- a/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp +++ b/tests/auto/quickdialogs/qquickfolderdialogimpl/tst_qquickfolderdialogimpl.cpp @@ -687,7 +687,7 @@ void tst_QQuickFolderDialogImpl::tabFocusNavigation() } // Tab through each item, checking the focus after each. - for (auto expectedFocusItem : qAsConst(expectedFocusItems)) { + for (auto expectedFocusItem : std::as_const(expectedFocusItems)) { // Check the focus item first so that we account for the first item. // Print detailed failure message as workaround for QTBUG-92102. QVERIFY2(dialogHelper.window()->activeFocusItem() == expectedFocusItem, qPrintable(QString::fromLatin1( @@ -702,7 +702,7 @@ void tst_QQuickFolderDialogImpl::tabFocusNavigation() std::reverse(expectedFocusItems.begin(), expectedFocusItems.end()); // We know the first (last) item has focus already, so skip it. expectedFocusItems.removeFirst(); - for (auto expectedFocusItem : qAsConst(expectedFocusItems)) { + for (auto expectedFocusItem : std::as_const(expectedFocusItems)) { QTest::keyClick(dialogHelper.window(), Qt::Key_Tab, Qt::ShiftModifier); QCOMPARE(dialogHelper.window()->activeFocusItem(), expectedFocusItem); |