Allow small delay in scene test for viewport resize

On linux, there seems to be some asynchronous activity
related to window resizing, since calling processEvents() is not
enough to ensure viewport size gets updated in subViews test.
Use QTRY_COMPARE to allow for small delay.

Change-Id: Idae04ff9436c819ef150caa57f6fa988e4011746
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
This commit is contained in:
Miikka Heikkinen 2014-10-30 14:45:15 +02:00
parent 2d61b8f27a
commit 89911624cf
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ void tst_scene::subViews()
QCoreApplication::processEvents();
QCOMPARE(scene->viewport(), QRect(0, 0, 200, 200));
QTRY_COMPARE(scene->viewport(), QRect(0, 0, 200, 200));
QCOMPARE(scene->primarySubViewport(), QRect(0, 0, 200, 200));
QCOMPARE(scene->secondarySubViewport(), QRect(0, 0, 0, 0));