diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 15:55:18 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 15:55:18 (GMT) |
commit | 3f39c3380f97339a1ffb9d13d7b184a8315d3821 (patch) | |
tree | 7b573b3d1fc16c380973fcc0a61c25154e19cb96 /src | |
parent | ce482e1495c12e531781eb5ad0a20a0c0292f853 (diff) | |
download | Qt-3f39c3380f97339a1ffb9d13d7b184a8315d3821.zip Qt-3f39c3380f97339a1ffb9d13d7b184a8315d3821.tar.gz Qt-3f39c3380f97339a1ffb9d13d7b184a8315d3821.tar.bz2 |
Expose QVariantAnimationPrivate::getInterpolator in the private header
These interpolator functions might be useful for other internal classes.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/animation/qvariantanimation.cpp | 4 | ||||
-rw-r--r-- | src/corelib/animation/qvariantanimation_p.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 52e2901..9f8cbf0 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -340,7 +340,7 @@ template<typename T> static inline QVariantAnimation::Interpolator castToInterpo return reinterpret_cast<QVariantAnimation::Interpolator>(func); } -static QVariantAnimation::Interpolator getInterpolator(int interpolationType) +QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int interpolationType) { QReadLocker locker(registeredInterpolatorsLock()); QVariantAnimation::Interpolator ret = 0; @@ -574,7 +574,7 @@ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &t Q_D(const QVariantAnimation); if (d->interpolator == 0) { if (from.userType() == to.userType()) - d->interpolator = getInterpolator(from.userType()); + d->interpolator = QVariantAnimationPrivate::getInterpolator(from.userType()); if (d->interpolator == 0) //no interpolator found return QVariant(); } diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h index c51b471..66910c1 100644 --- a/src/corelib/animation/qvariantanimation_p.h +++ b/src/corelib/animation/qvariantanimation_p.h @@ -124,6 +124,8 @@ public: void setValueAt(qreal, const QVariant &); QVariant valueAt(qreal step) const; void convertValues(int t); + + static QVariantAnimation::Interpolator getInterpolator(int interpolationType); }; //this should make the interpolation faster |