Remove deprecated method QQuaternion::conjugate

Change-Id: If539e47618357ef329925033842f266447632e6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Marcel Krems 2020-08-30 19:43:59 +02:00
parent 4e2656a6d2
commit c93b91c766
3 changed files with 4 additions and 24 deletions

View File

@ -314,13 +314,6 @@ void QQuaternion::normalize()
(-x, -y, -z, scalar). (-x, -y, -z, scalar).
*/ */
/*!
\fn QQuaternion QQuaternion::conjugate() const
\obsolete
Use conjugated() instead.
*/
/*! /*!
Rotates \a vector with this quaternion to produce a new vector Rotates \a vector with this quaternion to produce a new vector
in 3D space. The following code: in 3D space. The following code:

View File

@ -96,9 +96,6 @@ public:
inline QQuaternion inverted() const; inline QQuaternion inverted() const;
Q_REQUIRED_RESULT QQuaternion conjugated() const; Q_REQUIRED_RESULT QQuaternion conjugated() const;
#if QT_DEPRECATED_SINCE(5, 5)
Q_REQUIRED_RESULT QT_DEPRECATED QQuaternion conjugate() const;
#endif
QVector3D rotatedVector(const QVector3D& vector) const; QVector3D rotatedVector(const QVector3D& vector) const;
@ -220,13 +217,6 @@ inline QQuaternion QQuaternion::conjugated() const
return QQuaternion(wp, -xp, -yp, -zp); return QQuaternion(wp, -xp, -yp, -zp);
} }
#if QT_DEPRECATED_SINCE(5, 5)
inline QQuaternion QQuaternion::conjugate() const
{
return conjugated();
}
#endif
inline QQuaternion &QQuaternion::operator+=(const QQuaternion &quaternion) inline QQuaternion &QQuaternion::operator+=(const QQuaternion &quaternion)
{ {
wp += quaternion.wp; wp += quaternion.wp;

View File

@ -121,8 +121,8 @@ private slots:
void negate_data(); void negate_data();
void negate(); void negate();
void conjugate_data(); void conjugated_data();
void conjugate(); void conjugated();
void fromAxisAndAngle_data(); void fromAxisAndAngle_data();
void fromAxisAndAngle(); void fromAxisAndAngle();
@ -763,12 +763,12 @@ void tst_QQuaternion::negate()
} }
// Test quaternion conjugate calculations. // Test quaternion conjugate calculations.
void tst_QQuaternion::conjugate_data() void tst_QQuaternion::conjugated_data()
{ {
// Use the same test data as the add test. // Use the same test data as the add test.
add_data(); add_data();
} }
void tst_QQuaternion::conjugate() void tst_QQuaternion::conjugated()
{ {
QFETCH(float, x1); QFETCH(float, x1);
QFETCH(float, y1); QFETCH(float, y1);
@ -778,9 +778,6 @@ void tst_QQuaternion::conjugate()
QQuaternion v1(w1, x1, y1, z1); QQuaternion v1(w1, x1, y1, z1);
QQuaternion v2(w1, -x1, -y1, -z1); QQuaternion v2(w1, -x1, -y1, -z1);
#if QT_DEPRECATED_SINCE(5, 5)
QCOMPARE(v1.conjugate(), v2);
#endif
QCOMPARE(v1.conjugated(), v2); QCOMPARE(v1.conjugated(), v2);
} }