diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-02-03 13:32:25 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-02-06 11:23:02 +0100 |
commit | 5039143e6066243ff8a3ff235e395811a5eaf4df (patch) | |
tree | 27b57d7aa609ef83e013245fe5aa0e838516b9c4 | |
parent | bb9ef7c1804d109b33923bae2f48c48aa4f4d3b7 (diff) | |
download | qtsvg-5039143e6066243ff8a3ff235e395811a5eaf4df.tar.gz |
Get rid of QMatrix
Task-number: QTBUG-81628
Change-Id: I31f5ffeff1e20f2c77a67325e58a0522d25cb1b7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/svg/qsvgrenderer.cpp | 27 | ||||
-rw-r--r-- | src/svg/qsvgrenderer.h | 6 | ||||
-rw-r--r-- | tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 4 |
3 files changed, 2 insertions, 35 deletions
diff --git a/src/svg/qsvgrenderer.cpp b/src/svg/qsvgrenderer.cpp index 0097ec2..7cc7968 100644 --- a/src/svg/qsvgrenderer.cpp +++ b/src/svg/qsvgrenderer.cpp @@ -507,33 +507,6 @@ bool QSvgRenderer::elementExists(const QString &id) const return exists; } -#if QT_DEPRECATED_SINCE(5, 15) -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED -/*! - \since 4.2 - \deprecated - - Use transformForElement() instead. - - - Returns the transformation matrix for the element - with the given \a id. The matrix is a product of - the transformation of the element's parents. The transformation of - the element itself is not included. - - To find the bounding rectangle of the element in logical coordinates, - you can apply the matrix on the rectangle returned from boundsOnElement(). - - \sa boundsOnElement() -*/ -QMatrix QSvgRenderer::matrixForElement(const QString &id) const -{ - return transformForElement(id).toAffine(); -} -QT_WARNING_POP -#endif // QT_DEPRECATED_SINCE(5, 15) - /*! \since 5.15 diff --git a/src/svg/qsvgrenderer.h b/src/svg/qsvgrenderer.h index 3703b1c..418da85 100644 --- a/src/svg/qsvgrenderer.h +++ b/src/svg/qsvgrenderer.h @@ -40,8 +40,6 @@ #ifndef QSVGRENDERER_H #define QSVGRENDERER_H -#include <QtGui/qmatrix.h> - #ifndef QT_NO_SVGRENDERER #include <QtCore/qobject.h> @@ -94,10 +92,6 @@ public: QRectF boundsOnElement(const QString &id) const; bool elementExists(const QString &id) const; -#if QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_X("Use transformForElement()") - QMatrix matrixForElement(const QString &id) const; -#endif // QT_DEPRECATED_SINCE(5, 15) QTransform transformForElement(const QString &id) const; public Q_SLOTS: diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index 686c854..b8ce632 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -65,7 +65,7 @@ private slots: void loadQXmlStreamReader() const; void nestedQXmlStreamReader() const; void stylePropagation() const; - void matrixForElement() const; + void transformForElement() const; void boundsOnElement() const; void gradientStops() const; void gradientRefs(); @@ -545,7 +545,7 @@ static void compareTransforms(const QTransform &m1, const QTransform &m2) QVERIFY(diffIsSmallEnough(diffNorm, qMin(norm1, norm2))); } -void tst_QSvgRenderer::matrixForElement() const +void tst_QSvgRenderer::transformForElement() const { QByteArray data("<svg>" "<g id='ichi' transform='translate(-3,1)'>" |