diff --git a/animations/pause.cpp b/animations/pause.cpp index 47efbcfbe..68a2523bf 100644 --- a/animations/pause.cpp +++ b/animations/pause.cpp @@ -29,25 +29,8 @@ PauseAnimation::PauseAnimation(QObject *parent) { } -void PauseAnimation::setWidgetToAnimate(QGraphicsWidget *widget) +void PauseAnimation::updateCurrentTime(int) { - Animation::setWidgetToAnimate(widget); - if (animation.data()) { - delete animation.data(); - animation.clear(); - } -} - -QAbstractAnimation* PauseAnimation::render(QObject* parent) -{ - //Recreate only if needed - QPauseAnimation *anim = animation.data(); - if (!anim) { - anim = new QPauseAnimation(duration(), parent); - animation = anim; - } - - return anim; } } //namespace Plasma diff --git a/animations/pause_p.h b/animations/pause_p.h index 2d60f6198..d9b241030 100644 --- a/animations/pause_p.h +++ b/animations/pause_p.h @@ -41,13 +41,9 @@ class PauseAnimation : public Animation public: PauseAnimation(QObject *parent = 0); - void setWidgetToAnimate(QGraphicsWidget *widget); protected: - virtual QAbstractAnimation* render(QObject* parent = 0); - -private: - QWeakPointer animation; + void updateCurrentTime(int msecs); }; }