From 105e53b62b8374435428a4ad6583f24cf4af8638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 4 Nov 2022 14:39:18 +0100 Subject: [PATCH] tst_QGraphicsEffectSource: Reset effect repaint count after flushing events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to 8222e06d12a4e2a84ce1161abd0ceb58622c740b, which only reset the item repaint count. Flushing the queued paint events will bump numRepaints, and the whole point of calling reset() is to prepare a consistent state before the next test, so we need to call it after flushing the events. Change-Id: Id1fe840c14c0940d7020cf8f8cc6a3aeceaa5fb5 Reviewed-by: Volker Hilsheimer (cherry picked from commit fe67c69643ff72be0a32ed8bbb4f8ca827ce53c7) Reviewed-by: Tor Arne Vestbø --- .../qgraphicseffectsource/tst_qgraphicseffectsource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp index 27ab4ce49e4..43bc24e93d1 100644 --- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -154,10 +154,10 @@ void tst_QGraphicsEffectSource::init() QVERIFY(effect); QVERIFY(item); QVERIFY(effect->source()); - effect->reset(); effect->storeDeviceDependentStuff = false; effect->doNothingInDraw = false; QCoreApplication::processEvents(); // Process all queued paint events + effect->reset(); item->reset(); }