From: Jean-Baptiste Mardelle Date: Sat, 12 Nov 2011 20:05:39 +0000 (+0100) Subject: Cleanup X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b3d157e4bcfa9d9c04f53e6e7636f3c22c9d0625;hp=674229de00f3b42f64251808087651b0ccd1d6c9;p=kdenlive Cleanup --- diff --git a/src/transition.cpp b/src/transition.cpp index fe3aa518..c3c36e4d 100644 --- a/src/transition.cpp +++ b/src/transition.cpp @@ -43,14 +43,14 @@ Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, QD setPos(info.startPos.frames(fps), (int)(info.track * KdenliveSettings::trackheight() + itemOffset() + 1)); #if QT_VERSION >= 0x040600 - m_startAnimation = new QPropertyAnimation(this, "rect"); - m_startAnimation->setDuration(200); + QPropertyAnimation *startAnimation = new QPropertyAnimation(this, "rect", this); + startAnimation->setDuration(200); QRectF r(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal) itemHeight() / 2); QRectF r2(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal)itemHeight()); - m_startAnimation->setStartValue(r); - m_startAnimation->setEndValue(r2); - m_startAnimation->setEasingCurve(QEasingCurve::OutQuad); - m_startAnimation->start(); + startAnimation->setStartValue(r); + startAnimation->setEndValue(r2); + startAnimation->setEasingCurve(QEasingCurve::OutQuad); + startAnimation->start(QAbstractAnimation::DeleteWhenStopped); #else setRect(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal) itemHeight()); #endif @@ -79,9 +79,6 @@ Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, QD Transition::~Transition() { blockSignals(true); -#if QT_VERSION >= 0x040600 - delete m_startAnimation; -#endif if (scene()) scene()->removeItem(this); } diff --git a/src/transition.h b/src/transition.h index 7ffdc6c9..614d37ea 100644 --- a/src/transition.h +++ b/src/transition.h @@ -108,10 +108,6 @@ private: /** @brief Returns the transition type for a given name. */ TRANSITIONTYPE getTransitionForName(const QString & type); - -#if QT_VERSION >= 0x040600 - QPropertyAnimation *m_startAnimation; -#endif }; #endif