From 62f15dae7a002469aac7b61aeada7055092156a0 Mon Sep 17 00:00:00 2001 From: Adenilson Cavalcanti Da Silva Date: Wed, 18 Nov 2009 21:53:40 +0000 Subject: [PATCH] I'm non longer animating the geometry, so no need to have a copy of it around. svn path=/trunk/KDE/kdelibs/; revision=1051114 --- animations/pulser.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/animations/pulser.cpp b/animations/pulser.cpp index c79886a50..6cccecdd1 100644 --- a/animations/pulser.cpp +++ b/animations/pulser.cpp @@ -17,7 +17,7 @@ */ /* TODO: - * - fix centering of pulsed shadow object + * - fix opacity (for some reason is not working) */ #include "pulser_p.h" @@ -39,7 +39,6 @@ public : PulseAnimationPrivate() : animation(0), under(0), - pulseGeometry(0), zvalue(0), mscale(0), opacityAnimation(0), @@ -48,14 +47,10 @@ public : {} ~PulseAnimationPrivate() - { - if (pulseGeometry) - delete pulseGeometry; - } + { } QAbstractAnimation *animation; QGraphicsWidget *under; - QRectF *pulseGeometry; qreal zvalue, mscale, mopacity; QPropertyAnimation *opacityAnimation; QPropertyAnimation *geometryAnimation; @@ -87,10 +82,6 @@ void PulseAnimation::setCopy() shadow->copyTarget(target); - if (d->pulseGeometry) - delete d->pulseGeometry; - d->pulseGeometry = new QRectF(target->geometry()); - d->mopacity = 0; d->zvalue = target->zValue(); --d->zvalue; @@ -146,7 +137,7 @@ void PulseAnimation::createAnimation(qreal duration, qreal scale) * and *then* reset the geometry */ } else { - if ((*d->pulseGeometry) != widgetToAnimate()->geometry()) + if (d->under->size() != widgetToAnimate()->size()) setCopy(); d->opacityAnimation->setEndValue(0);