Fix desktop style animations to stop when the control is hidden v5.2.0
authorJ-P Nurmi <jpnurmi@digia.com>
Mon, 2 Dec 2013 21:32:51 +0000 (22:32 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 3 Dec 2013 11:29:44 +0000 (12:29 +0100)
commit1d684b38a4fb0b8ce33401fa9c8f415eba6097bf
tree3f0a8ffc1e2533485055ef18461bfcec9d0fd6f5
parent78c8e7d9a7860c15f907615f2b02b3986a080d2a
Fix desktop style animations to stop when the control is hidden

QStyleAnimation automatically stopped for hidden QWidgets, but didn't
know anything about QQuickItems and kept animating regardless of their
visibility. QStyleAnimation was changed so that it will keep animating
only as long as the animation target accepts animation updates. This
change ensures that the style animation updates are accepted only when
the control is visible.

Note: In order to restart such style animations, QQuickStyleItem needs
to be manually updated when it becomes visible.

Task-number: QTBUG-35319
Change-Id: Ia053912883b9babb184a5467adfc90dd619b3dc5
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
src/controls/Private/qquickstyleitem.cpp