diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-03-14 17:42:18 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-16 19:04:01 +0000 |
commit | db558fe10bf4f609b26f9da1ef3ff0d4a16d4699 (patch) | |
tree | d3afd5b28877cb207e1d794b7669c42d0878d759 /tests | |
parent | a62b8a3ad9880713fd20b33cfea17ca1d3150c52 (diff) |
Enable tests to turn off Windows Vista animations
Animations in that style depend on the current time, which makes it
impossible to run baseline tests. Introduce a dynamic property that
allows us to set the time that animations use.
This way, tests can turn the animation off, or control which time should
be used.
To keep performance overhead low, check only once whether the dynamic
property is set at all.
Change-Id: I9bc57b9867fb0d852e101570eca4c7609e7fe1a8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 58a14d943353f02bfbee0a65f5e31c40358c8c53)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/baseline/shared/qwidgetbaselinetest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/baseline/shared/qwidgetbaselinetest.cpp b/tests/baseline/shared/qwidgetbaselinetest.cpp index 41771cf669..3be8ae7893 100644 --- a/tests/baseline/shared/qwidgetbaselinetest.cpp +++ b/tests/baseline/shared/qwidgetbaselinetest.cpp @@ -53,6 +53,7 @@ QWidgetBaselineTest::QWidgetBaselineTest() #else QApplication::style()->name(); #endif + QApplication::style()->setProperty("_qt_animation_time", QTime()); QByteArray appearanceBytes; { QDataStream appearanceStream(&appearanceBytes, QIODevice::WriteOnly); |