summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativeanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativeanimation.cpp')
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index bad142c..ba1444e 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1078,15 +1078,26 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
- Q_D(QDeclarativePropertyAnimation);
- d->interpolatorType = QMetaType::QReal;
- d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+ init();
+}
+
+QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent)
+: QDeclarativePropertyAnimation(dd, parent)
+{
+ init();
}
QDeclarativeNumberAnimation::~QDeclarativeNumberAnimation()
{
}
+void QDeclarativeNumberAnimation::init()
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->interpolatorType = QMetaType::QReal;
+ d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+}
+
/*!
\qmlproperty real NumberAnimation::from
This property holds the starting value.
@@ -2237,8 +2248,10 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
}
d->va->setAnimValue(data, QAbstractAnimation::DeleteWhenStopped);
d->va->setFromSourcedValue(&data->fromSourced);
+ d->actions = &data->actions;
} else {
delete data;
+ d->actions = 0;
}
}