This reverts commit a9b430b965.
The reproducer of QTBUG-136629 shows an animation timer being deleted
without unregistering itself from the QUnifiedTimer driving it. It's
clearly the animation timer's responsibility to notify the
QUnifiedTimer about its deletion. Deleting the QUnifiedTimer on
application shutdown happens to fix the problem in this case, but is in
no way a generic solution to the issue of deleted animation timers
leaving dangling pointers in QUnifiedTimer.
Furthermore, prematurely deleting the QUnifiedTimer is an overt behavior
change. Before this, you could leave animations running across exec/quit
cycles of the QCoreApplication. When the QUnifiedTimer is deleted on
quitting the QCoreApplication, this is not possible anymore. The
QtStateMachine tests exercise this behavior.
Instead of working around the problem in QtCore, the offending animation
timer should simply unregister itself. This is a fix to be applied to
QtQml.
Pick-to: 6.8
Fixes: QTBUG-139989
Change-Id: I72acc9af5f7126e068600a4dfd581f9784713804
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bcefe20119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5906668f9e)