diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-05-14 09:50:37 +0300 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-05-21 06:05:15 +0000 |
commit | 8e9fde2bf1003c6b8f1ef6f37150f81fcd1c9193 (patch) | |
tree | afa6c7c85f50b54f8ed6311dae8994ec9e88e8ed /tests/auto/widgets/effects | |
parent | 8f6f9cbaa93e386dcbc447641bb6454e6899e067 (diff) |
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 <ville.voutilainen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests/auto/widgets/effects')
-rw-r--r-- | tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp | 4 |
1 files 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); } } |