diff options
author | Marcel Krems <m.krems@software-vision.eu> | 2020-08-24 19:33:18 +0200 |
---|---|---|
committer | Marcel Krems <m.krems@software-vision.eu> | 2020-08-26 01:49:24 +0200 |
commit | 8dd50ef206f384ac781d6bb9ca5e254851531298 (patch) | |
tree | 85f612d1c12b53d544757440b09e886d23a6c07f | |
parent | ba9c4ee2cbcfc2513e9e5a3973eac207115aadfd (diff) |
Remove deprecated qGenericMatrix{To,From}Matrix4x4 functions
Change-Id: I3b43d48f5324f3a1f2fff8e22bb4f9563d3ea997
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/gui/math3d/qmatrix4x4.cpp | 24 | ||||
-rw-r--r-- | src/gui/math3d/qmatrix4x4.h | 27 | ||||
-rw-r--r-- | tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp | 10 |
3 files changed, 0 insertions, 61 deletions
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 31bc51b9e1..bad19267d3 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -145,30 +145,6 @@ QMatrix4x4::QMatrix4x4(const float *values) */ /*! - \fn template <int N, int M> QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, float>& matrix) - \relates QMatrix4x4 - \obsolete - - Returns a 4x4 matrix constructed from the left-most 4 columns and - top-most 4 rows of \a matrix. If \a matrix has less than 4 columns - or rows, the remaining elements are filled with elements from the - identity matrix. -*/ - -/*! - \fn QGenericMatrix<N, M, float> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) - \relates QMatrix4x4 - \obsolete - - Returns a NxM generic matrix constructed from the left-most N columns - and top-most M rows of \a matrix. If N or M is greater than 4, - then the remaining elements are filled with elements from the - identity matrix. - - \sa QMatrix4x4::toGenericMatrix() -*/ - -/*! \internal */ QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows) diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 4f1a74a834..5664de6729 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -1109,33 +1109,6 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QMatrix4x4 &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QMatrix4x4 &); #endif -#if QT_DEPRECATED_SINCE(5, 0) -template <int N, int M> -QT_DEPRECATED QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, float>& matrix) -{ - return QMatrix4x4(matrix.constData(), N, M); -} - -template <int N, int M> -QT_DEPRECATED QGenericMatrix<N, M, float> qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) -{ - QGenericMatrix<N, M, float> result; - const float *m = matrix.constData(); - float *values = result.data(); - for (int col = 0; col < N; ++col) { - for (int row = 0; row < M; ++row) { - if (col < 4 && row < 4) - values[col * M + row] = m[col * 4 + row]; - else if (col == row) - values[col * M + row] = 1.0f; - else - values[col * M + row] = 0.0f; - } - } - return result; -} -#endif - #endif QT_END_NAMESPACE diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp index 26e22e5883..b55cc2b007 100644 --- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp @@ -2860,11 +2860,6 @@ void tst_QMatrixNxN::convertGeneric() QMatrix4x4 m4(m1); QVERIFY(isSame(m4, unique4x4)); -#if QT_DEPRECATED_SINCE(5, 0) - QMatrix4x4 m5 = qGenericMatrixToMatrix4x4(m1); - QVERIFY(isSame(m5, unique4x4)); -#endif - static float const conv4x4[12] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, @@ -2874,11 +2869,6 @@ void tst_QMatrixNxN::convertGeneric() QMatrix4x3 m10 = m9.toGenericMatrix<4, 3>(); QVERIFY(isSame(m10, conv4x4)); - -#if QT_DEPRECATED_SINCE(5, 0) - QMatrix4x3 m11 = qGenericMatrixFromMatrix4x4<4, 3>(m9); - QVERIFY(isSame(m11, conv4x4)); -#endif } // Copy of "flagBits" in qmatrix4x4.h. |