QEasingCurve: fix missing copy() override

TCBEase is-a BezierEase, but overrides value(). It only performs additional
checks and then calls the base class' implementation, but it feels wrong,
like a bug waiting to manifest itself, that slicing should occur on cloning
a TCBEase.

Fix by adding the missing reimplmentation.

Change-Id: I2524f51fec1850ff36ed706bc79e9592734d8680
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
Marc Mutz 2019-05-26 17:23:42 +02:00
parent 93b845464f
commit ce99361cc0

View File

@ -907,6 +907,10 @@ struct TCBEase : public BezierEase
return BezierEase::value(x);
}
QEasingCurveFunction *copy() const override
{
return new TCBEase{*this};
}
};
struct ElasticEase : public QEasingCurveFunction