From 4ce485a2eba40cc6d1edcf4baa794276432e1bea Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Feb 2019 10:23:20 +0100 Subject: Fix some QPainter-related deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit text/qtextdocument.cpp:2666:48: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] text/qtextdocumentfragment.cpp:545:87: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] text/qtextdocumentfragment.cpp:546:68: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3321:34: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3342:48: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3366:47: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainter.cpp:4233:49: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainter.cpp:8349:27: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations] painting/qpdf.cpp:1545:28: warning: ‘void QDataStream::unsetDevice()’ is deprecated: Use QDataStream::setDevice(nullptr) instead [-Wdeprecated-declarations] widgets/qtabbar.cpp:2096:17: warning: ‘void QPainter::initFrom(const QPaintDevice*)’ is deprecated: Use begin(QPaintDevice*) instead [-Wdeprecated-declarations] Change-Id: I76d98ea8146e7586d3763a5610781c7736d37204 Reviewed-by: Christian Ehrlicher --- src/gui/painting/qpainter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/painting/qpainter.cpp') diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 570f750645..95e6bda78b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -4219,7 +4219,7 @@ void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd) */ void QPainter::drawRoundRect(const QRect &rect, int xRnd, int yRnd) { - drawRoundRect(QRectF(rect), xRnd, yRnd); + drawRoundedRect(QRectF(rect), xRnd, yRnd, Qt::RelativeSize); } /*! @@ -4233,7 +4233,7 @@ void QPainter::drawRoundRect(const QRect &rect, int xRnd, int yRnd) */ void QPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd) { - drawRoundRect(QRectF(x, y, w, h), xRnd, yRnd); + drawRoundedRect(QRectF(x, y, w, h), xRnd, yRnd, Qt::RelativeSize); } #endif @@ -8349,7 +8349,7 @@ void QPainter::resetTransform() d->state->ww = d->state->vw = d->device->metric(QPaintDevice::PdmWidth); d->state->wh = d->state->vh = d->device->metric(QPaintDevice::PdmHeight); d->state->worldMatrix = QTransform(); - setMatrixEnabled(false); + setWorldMatrixEnabled(false); setViewTransformEnabled(false); if (d->extended) d->extended->transformChanged(); -- cgit v1.2.3