From 4bb897a3841f0f79150787e29fe122e1410bc119 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 10 Jan 2020 10:08:37 +0100 Subject: Deprecate all methods that use QMatrix Don't use QMatrix in implementation classes anymore. Task-number: QTBUG-46653 Fixes: QTBUG-81627 Change-Id: I4806c1302e42645dc6a608062c8d9c336ae8629b Reviewed-by: Leena Miettinen Reviewed-by: Laszlo Agocs Reviewed-by: Lars Knoll --- tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tests/auto/gui/painting/qpainter/tst_qpainter.cpp') diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index e05de64be5..9eb62ceab2 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -1704,8 +1704,11 @@ void tst_QPainter::combinedMatrix() QTransform ct = p.combinedTransform(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QMatrix cm = p.combinedMatrix(); QCOMPARE(cm, ct.toAffine()); +QT_WARNING_POP #endif QPointF pt = QPointF(0, 0) * ct.toAffine(); @@ -2245,7 +2248,7 @@ void tst_QPainter::clippedPolygon() { QFETCH(QSize, imageSize); QFETCH(QPainterPath, path); - QPolygonF polygon = path.toFillPolygon(); + QPolygonF polygon = path.toFillPolygon(QTransform()); QFETCH(QRect, clipRect); QPainterPath clipPath; clipPath.addRect(clipRect); @@ -3066,7 +3069,7 @@ void tst_QPainter::fpe_steepSlopes_data() const qreal dsin = 0.000014946676875461832484392500630665523431162000633776187896728515625; const qreal dcos = 0.9999999998882984630910186751862056553363800048828125; - const QTransform transform = QTransform(QMatrix(dcos, dsin, -dsin, dcos, 64, 64)); + const QTransform transform = QTransform(dcos, dsin, -dsin, dcos, 64, 64); const QLineF line(2, 2, 2, 6); QTest::newRow("task 207147 aa") << transform << line << true; @@ -4064,7 +4067,7 @@ void tst_QPainter::drawPolygon() path.moveTo(2, 34); path.lineTo(34, 2); - QPolygonF poly = stroker.createStroke(path).toFillPolygon(); + QPolygonF poly = stroker.createStroke(path).toFillPolygon(QTransform()); img.fill(0xffffffff); QPainter p(&img); @@ -4133,7 +4136,10 @@ void tst_QPainter::inactivePainter() p.setClipping(true); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.combinedMatrix(); +QT_WARNING_POP #endif p.combinedTransform(); @@ -4142,7 +4148,10 @@ void tst_QPainter::inactivePainter() p.device(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.deviceMatrix(); +QT_WARNING_POP #endif p.deviceTransform(); @@ -4168,7 +4177,10 @@ void tst_QPainter::inactivePainter() p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, false); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.resetMatrix(); +QT_WARNING_POP #endif p.resetTransform(); p.rotate(1); @@ -4186,8 +4198,11 @@ void tst_QPainter::inactivePainter() p.setWindow(QRect(10, 10, 620, 460)); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.worldMatrix(); p.setWorldMatrix(QMatrix().translate(43, 21), true); +QT_WARNING_POP #endif p.setWorldMatrixEnabled(true); -- cgit v1.2.3