Baseline tests: disable animations in the vista style
The Vista style uses a dynamic property on each objects to control animations; respect that dynamic property on the style itself as well to make it possible to turn off animations. Do so in the baseline test framework to get rid of some flakiness when using the Windows Vista style. Change-Id: I2bad329786f38e37d99f947f121e5cd44f5741c1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
This commit is contained in:
parent
be4e3082f7
commit
b340fb6982
@ -204,6 +204,9 @@ void QWindowsVistaStylePrivate::cleanup(bool force)
|
||||
|
||||
bool QWindowsVistaStylePrivate::transitionsEnabled() const
|
||||
{
|
||||
Q_Q(const QWindowsVistaStyle);
|
||||
if (q->property("_q_no_animation").toBool())
|
||||
return false;
|
||||
if (QApplication::desktopSettingsAware()) {
|
||||
BOOL animEnabled = false;
|
||||
if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)) {
|
||||
|
@ -33,6 +33,7 @@ QWidgetBaselineTest::QWidgetBaselineTest()
|
||||
#endif
|
||||
// turn off animations and make the cursor flash time really long to avoid blinking
|
||||
QApplication::style()->setProperty("_qt_animation_time", QTime());
|
||||
QApplication::style()->setProperty("_q_no_animation", true);
|
||||
QGuiApplication::styleHints()->setCursorFlashTime(50000);
|
||||
|
||||
QByteArray appearanceBytes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user