From be36a0e284c8341c9b81b009d936530c99eabf71 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 repaint count after flushing events 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: Iaefc9854caafe82c65c9587e18fd081439e8dda6 Reviewed-by: Volker Hilsheimer (cherry picked from commit 8222e06d12a4e2a84ce1161abd0ceb58622c740b) Reviewed-by: Qt Cherry-pick Bot --- .../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 10c550efc08..27ab4ce49e4 100644 --- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -157,8 +157,8 @@ void tst_QGraphicsEffectSource::init() effect->reset(); effect->storeDeviceDependentStuff = false; effect->doNothingInDraw = false; - item->reset(); QCoreApplication::processEvents(); // Process all queued paint events + item->reset(); } void tst_QGraphicsEffectSource::graphicsItem()