From 5d6b2d5e343e27940e5fd78cb2aa897aac6bc2ed Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 18 Feb 2012 08:52:13 +0100 Subject: QEasingCurve: add member-swap Implementated as in QPen etc. Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/tools/qeasingcurve.cpp | 7 +++++++ src/corelib/tools/qeasingcurve.h | 3 +++ 2 files changed, 10 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 5731faa69c..6f8572cfbf 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -1115,6 +1115,13 @@ QEasingCurve &QEasingCurve::operator=(const QEasingCurve &other) return *this; } +/*! + \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. diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h index a5a707102b..8b2e783bdc 100644 --- a/src/corelib/tools/qeasingcurve.h +++ b/src/corelib/tools/qeasingcurve.h @@ -83,6 +83,9 @@ public: ~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)); } -- cgit v1.2.3