Implementated as in QPen etc.
Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
}
/*!
+ \fn void QEasingCurve::swap(QEasingCurve &other)
+ \since 5.0
+
+ Swaps curve \a other with this curve. This operation is very
+ fast and never fails.
+
+/*!
Compare this easing curve with \a other and returns true if they are
equal. It will also compare the properties of a curve.
*/
~QEasingCurve();
QEasingCurve &operator=(const QEasingCurve &other);
+
+ inline void swap(QEasingCurve &other) { qSwap(d_ptr, other.d_ptr); }
+
bool operator==(const QEasingCurve &other) const;
inline bool operator!=(const QEasingCurve &other) const
{ return !(this->operator==(other)); }
void tst_QEasingCurve::operators()
{
+ { // member-swap()
+ QEasingCurve ec1, ec2;
+ ec2.setCustomType(&discreteEase);
+ ec1.swap(ec2);
+ QCOMPARE(ec1.type(), QEasingCurve::Custom);
+ }
+
// operator=
QEasingCurve curve;
QEasingCurve curve2;