From 5039143e6066243ff8a3ff235e395811a5eaf4df Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 3 Feb 2020 13:32:25 +0100 Subject: Get rid of QMatrix Task-number: QTBUG-81628 Change-Id: I31f5ffeff1e20f2c77a67325e58a0522d25cb1b7 Reviewed-by: Volker Hilsheimer --- src/svg/qsvgrenderer.cpp | 27 --------------------------- src/svg/qsvgrenderer.h | 6 ------ 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 - #ifndef QT_NO_SVGRENDERER #include @@ -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("" "" -- cgit v1.2.1