~QEasingCurve();
QEasingCurve &operator=(const QEasingCurve &other);
+#ifdef Q_COMPILER_RVALUE_REFS
+ QEasingCurve &operator=(QEasingCurve &&other)
+ { qSwap(d_ptr, other.d_ptr); return *this; }
+#endif
inline void swap(QEasingCurve &other) { qSwap(d_ptr, other.d_ptr); }
#include <qeasingcurve.h>
+#ifdef Q_COMPILER_RVALUE_REFS // cpp11() slot
+# include <utility> // for std::move()
+#endif
+
class tst_QEasingCurve : public QObject
{
Q_OBJECT
void tcbSpline();
void testCbrtDouble();
void testCbrtFloat();
+ void cpp11();
};
void tst_QEasingCurve::type()
}
}
+void tst_QEasingCurve::cpp11()
+{
+#ifdef Q_COMPILER_RVALUE_REFS
+ {
+ QEasingCurve ec( QEasingCurve::InOutBack );
+ QEasingCurve copy;
+ const QEasingCurve::Type type = copy.type();
+ copy = std::move(ec); // move assignment op
+ QCOMPARE( copy.type(), QEasingCurve::InOutBack );
+ QCOMPARE( ec.type(), type );
+ }
+#endif
+}
+
QTEST_MAIN(tst_QEasingCurve)
#include "tst_qeasingcurve.moc"