summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index d4e4ea22d0..dd75870437 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1062,22 +1062,19 @@ QStyleAnimation * QCommonStylePrivate::animation(const QObject *target) const
}
/*! \internal */
-void QCommonStylePrivate::startAnimation(QStyleAnimation *animation)
+void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
{
-#ifndef QT_NO_ANIMATION
- Q_Q(QCommonStyle);
+ Q_Q(const QCommonStyle);
stopAnimation(animation->target());
q->connect(animation, SIGNAL(finished()), SLOT(_q_removeAnimation()), Qt::UniqueConnection);
q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection);
animations.insert(animation->target(), animation);
animation->start();
-#endif // QT_NO_ANIMATION
}
/*! \internal */
-void QCommonStylePrivate::stopAnimation(const QObject *target)
+void QCommonStylePrivate::stopAnimation(const QObject *target) const
{
-#ifndef QT_NO_ANIMATION
QStyleAnimation *animation = animations.value(target);
if (animation) {
if (animation->state() == QAbstractAnimation::Stopped)
@@ -1085,20 +1082,17 @@ void QCommonStylePrivate::stopAnimation(const QObject *target)
else
animation->stop();
}
-#endif // QT_NO_ANIMATION
}
/*! \internal */
void QCommonStylePrivate::_q_removeAnimation()
{
-#ifndef QT_NO_ANIMATION
Q_Q(QCommonStyle);
QObject *animation = q->sender();
if (animation) {
animations.remove(animation->parent());
animation->deleteLater();
}
-#endif // QT_NO_ANIMATION
}
/*!