diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2014-07-30 08:24:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-02 23:19:44 +0200 |
commit | ec5f402cfd0bc439cd373ca8c99c59cb11556966 (patch) | |
tree | dd6d7490c7a70dd8dbc11a7162478e8fa0183948 /src/corelib/tools/qeasingcurve.cpp | |
parent | e12f6a47a530219261165f81880d01484320e98d (diff) |
QEasingCurve: The setting order of properties should not matter.
Previously, this failed because QEasingCurveFunction only had a linear
behavior.
The fix is to change that and let QEasingCurveFunction handle
any of the simple "non-parametric easing" functions.
Task-number: QTBUG-38686
Change-Id: I666d59e10ceb589dcc52956b16a6f0c259aebdad
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qeasingcurve.cpp')
-rw-r--r-- | src/corelib/tools/qeasingcurve.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 12adc5a433..91a726d785 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -373,9 +373,12 @@ public: }; +static QEasingCurve::EasingFunction curveToFunc(QEasingCurve::Type curve); + qreal QEasingCurveFunction::value(qreal t) { - return t; + QEasingCurve::EasingFunction func = curveToFunc(_t); + return func(t); } QEasingCurveFunction *QEasingCurveFunction::copy() const |