From 8e9fde2bf1003c6b8f1ef6f37150f81fcd1c9193 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Mon, 14 May 2018 09:50:37 +0300 Subject: tst_QGraphicsEffect: Allow multiple paint events in itemHasNoContents() Right now itemHasNoContents() is flaky when run together with others on macOS. The failing assertion seems to be just checking that an effect added to an item with the QGraphicsEffect::ItemHasNoContents flag is painted, so relax it to allow multiple repaints. Change-Id: Iecf445ce1bce672e7cd180a148cd53f9c60e40fe Reviewed-by: Ville Voutilainen Reviewed-by: Friedemann Kleint Reviewed-by: Laszlo Agocs --- tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp index 5b142048b5..95662a49a0 100644 --- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp @@ -731,12 +731,12 @@ void tst_QGraphicsEffect::itemHasNoContents() CustomEffect *effect = new CustomEffect; parent->setGraphicsEffect(effect); - QTRY_COMPARE(effect->numRepaints, 1); + QTRY_VERIFY(effect->numRepaints >= 1); for (int i = 0; i < 3; ++i) { effect->reset(); effect->update(); - QTRY_COMPARE(effect->numRepaints, 1); + QTRY_VERIFY(effect->numRepaints >= 1); } } -- cgit v1.2.3