diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-10-17 12:02:22 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-17 05:46:16 +0200 |
commit | af3b3cd20060f7a55d64bd7b7533854267d133f7 (patch) | |
tree | abfe6c33f9f44ed948b5f10cedc81923ca3ec3fe /tests/auto/particles/shared/particlestestsshared.h | |
parent | cec7b67ec38934560c19a4e4361d684c25143fa8 (diff) |
Stabilize Particles Tests
A couple of targeted fixes, plus enabling
QUnifiedTimer::consistentTiming.
Task-number: QTBUG-21867
Change-Id: I62acf524eb2c6491bc88fd687a0065866d7ce8aa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/particles/shared/particlestestsshared.h')
-rw-r--r-- | tests/auto/particles/shared/particlestestsshared.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/particles/shared/particlestestsshared.h b/tests/auto/particles/shared/particlestestsshared.h index 66e880fc5b..ed483bae01 100644 --- a/tests/auto/particles/shared/particlestestsshared.h +++ b/tests/auto/particles/shared/particlestestsshared.h @@ -43,6 +43,7 @@ #define PARTICLES_TESTS_SHARED #include <QSGView> #include <QtTest> +#include <QAbstractAnimation> const qreal EPSILON = 0.0001; bool extremelyFuzzyCompare(qreal a, qreal b, qreal e)//For cases which can have larger variances @@ -80,4 +81,10 @@ QSGView* createView(const QString &filename, int additionalWait=0) return canvas; } +void ensureAnimTime(int requiredTime, QAbstractAnimation* anim)//With consistentTiming, who knows how long an animation really takes... +{ + while (anim->currentTime() < requiredTime) + QTest::qWait(100); +} + #endif |