mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
move the QEasingCurve::Custom case to the switch in QEasingCurve::valueForProgress()
side note: only plasma and KWin set custom QEasingCurve function, both are not used Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
41bea107bf
commit
6fe67b22f9
1 changed files with 7 additions and 5 deletions
|
@ -559,10 +559,6 @@ qreal QEasingCurve::valueForProgress(qreal progress) const
|
|||
{
|
||||
progress = qBound<qreal>(0, progress, 1);
|
||||
|
||||
if (d_ptr->func) {
|
||||
return d_ptr->func(progress);
|
||||
}
|
||||
|
||||
switch (d_ptr->type) {
|
||||
case QEasingCurve::Linear: {
|
||||
return easeNone(progress);
|
||||
|
@ -699,7 +695,13 @@ qreal QEasingCurve::valueForProgress(qreal progress) const
|
|||
case QEasingCurve::OutInBack: {
|
||||
return easeOutInBack(progress, BOUND_OVERSHOOT(d_ptr->over));
|
||||
}
|
||||
default: {
|
||||
case QEasingCurve::Custom: {
|
||||
if (Q_LIKELY(d_ptr->func)) {
|
||||
return d_ptr->func(progress);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QEasingCurve::NCurveTypes: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue