diff options
Diffstat (limited to 'src/declarative/util/qmlanimation_p.h')
-rw-r--r-- | src/declarative/util/qmlanimation_p.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 728584c..0ef89f4 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -203,7 +203,11 @@ class QmlColorAnimationPrivate : public QmlAbstractAnimationPrivate Q_DECLARE_PUBLIC(QmlColorAnimation); public: QmlColorAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) {} + : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) + { + if (!colorInterpolator) + colorInterpolator = QVariantAnimationPrivate::getInterpolator(QVariant::Color); + } void init(); @@ -218,6 +222,8 @@ public: virtual void valueChanged(qreal); QmlTimeLineValueProxy<QmlColorAnimationPrivate> value; + + static QVariantAnimation::Interpolator colorInterpolator; }; class QmlRunScriptActionPrivate : public QmlAbstractAnimationPrivate |