diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 7345055dee..7916609dd7 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1265,12 +1265,6 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w #endif // QT_CONFIG(tabbar) #if QT_CONFIG(animation) -/*! \internal */ -QList QCommonStylePrivate::animationTargets() const -{ - return animations.keys(); -} - /*! \internal */ QStyleAnimation * QCommonStylePrivate::animation(const QObject *target) const { @@ -1282,7 +1276,9 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const { Q_Q(const QCommonStyle); stopAnimation(animation->target()); - q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); + QObjectPrivate::connect(animation, &QStyleAnimation::destroyed, + this, &QCommonStylePrivate::removeAnimation, + Qt::UniqueConnection); animations.insert(animation->target(), animation); animation->start(); } @@ -1298,7 +1294,7 @@ void QCommonStylePrivate::stopAnimation(const QObject *target) const } /*! \internal */ -void QCommonStylePrivate::_q_removeAnimation() +void QCommonStylePrivate::removeAnimation() { Q_Q(QCommonStyle); QObject *animation = q->sender(); diff --git a/src/widgets/styles/qcommonstyle.h b/src/widgets/styles/qcommonstyle.h index d6485c6015..40ed13d453 100644 --- a/src/widgets/styles/qcommonstyle.h +++ b/src/widgets/styles/qcommonstyle.h @@ -61,9 +61,6 @@ protected: private: Q_DECLARE_PRIVATE(QCommonStyle) Q_DISABLE_COPY(QCommonStyle) -#if QT_CONFIG(animation) - Q_PRIVATE_SLOT(d_func(), void _q_removeAnimation()) -#endif }; QT_END_NAMESPACE diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h index bd35dd4cfc..b9f32230f9 100644 --- a/src/widgets/styles/qcommonstyle_p.h +++ b/src/widgets/styles/qcommonstyle_p.h @@ -92,12 +92,10 @@ public: int animationFps; #if QT_CONFIG(animation) - void _q_removeAnimation(); - - QList animationTargets() const; QStyleAnimation* animation(const QObject *target) const; void startAnimation(QStyleAnimation *animation) const; void stopAnimation(const QObject *target) const; + void removeAnimation(); private: mutable QHash animations;