Skip to content

Instantly share code, notes, and snippets.

@torarnv
Created June 19, 2019 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torarnv/57d92110fff99def534a6f6924f861cd to your computer and use it in GitHub Desktop.
Save torarnv/57d92110fff99def534a6f6924f861cd to your computer and use it in GitHub Desktop.
diff --git i/src/corelib/animation/qabstractanimation.cpp w/src/corelib/animation/qabstractanimation.cpp
index 78b79e574a..42308b78fb 100644
--- i/src/corelib/animation/qabstractanimation.cpp
+++ w/src/corelib/animation/qabstractanimation.cpp
@@ -1049,31 +1049,31 @@ QAbstractAnimation::QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *p
setParent(parent);
}
/*!
Stops the animation if it's running, then destroys the
QAbstractAnimation. If the animation is part of a QAnimationGroup, it is
automatically removed before it's destroyed.
*/
QAbstractAnimation::~QAbstractAnimation()
{
Q_D(QAbstractAnimation);
//we can't call stop here. Otherwise we get pure virtual calls
if (d->state != Stopped) {
QAbstractAnimation::State oldState = d->state;
d->state = Stopped;
- emit stateChanged(oldState, d->state);
+ emit stateChanged(d->state, oldState);
if (oldState == QAbstractAnimation::Running)
QAnimationTimer::unregisterAnimation(this);
}
}
/*!
\property QAbstractAnimation::state
\brief state of the animation.
This property describes the current state of the animation. When the
animation state changes, QAbstractAnimation emits the stateChanged()
signal.
*/
QAbstractAnimation::State QAbstractAnimation::state() const
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment