From da2f08af67916ce09daf6dea185a118e0f8bcd6b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Feb 2019 15:13:17 +0100 Subject: Fix some deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit debugging/qscriptedit.cpp:286:39: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] debugging/qscriptedit.cpp:309:48: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:309:48: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:315:49: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:315:49: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:318:45: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:318:45: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] tst_qscriptvalue.cpp:1270:45: warning: ‘T qVariantValue(const QVariant&) [with T = QObject*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:343:64: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QLineEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:345:75: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QPlainTextEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:354:88: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QPlainTextEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:836:33: warning: ignoring return value of ‘bool QTest::qWaitForWindowExposed(QWidget*, int)’, declared with attribute nodiscard [-Wunused-result] context2d.cpp:473:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:486:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:500:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:627:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] tetrixboard.cpp:104:76: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] tetrixboard.cpp:130:33: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] tetrixboard.cpp:134:32: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] Change-Id: I795c140c476541bba9c653effdcda0a50cbe9acd Reviewed-by: Christian Ehrlicher --- examples/script/context2d/context2d.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/script/context2d/context2d.cpp') diff --git a/examples/script/context2d/context2d.cpp b/examples/script/context2d/context2d.cpp index 831e017..5b8b9f6 100644 --- a/examples/script/context2d/context2d.cpp +++ b/examples/script/context2d/context2d.cpp @@ -470,7 +470,7 @@ void Context2D::clearRect(qreal x, qreal y, qreal w, qreal h) { beginPainting(); m_painter.save(); - m_painter.setMatrix(m_state.matrix, false); + m_painter.setTransform(QTransform(m_state.matrix), false); m_painter.setCompositionMode(QPainter::CompositionMode_Source); m_painter.fillRect(QRectF(x, y, w, h), QColor(0, 0, 0, 0)); m_painter.restore(); @@ -483,7 +483,7 @@ void Context2D::fillRect(qreal x, qreal y, qreal w, qreal h) { beginPainting(); m_painter.save(); - m_painter.setMatrix(m_state.matrix, false); + m_painter.setTransform(QTransform(m_state.matrix), false); m_painter.fillRect(QRectF(x, y, w, h), m_painter.brush()); m_painter.restore(); scheduleChange(); @@ -497,7 +497,7 @@ void Context2D::strokeRect(qreal x, qreal y, qreal w, qreal h) path.addRect(x, y, w, h); beginPainting(); m_painter.save(); - m_painter.setMatrix(m_state.matrix, false); + m_painter.setTransform(QTransform(m_state.matrix), false); m_painter.strokePath(path, m_painter.pen()); m_painter.restore(); scheduleChange(); @@ -624,7 +624,7 @@ void Context2D::stroke() { beginPainting(); m_painter.save(); - m_painter.setMatrix(m_state.matrix, false); + m_painter.setTransform(QTransform(m_state.matrix), false); QPainterPath tmp = m_state.matrix.inverted().map(m_path); m_painter.strokePath(tmp, m_painter.pen()); m_painter.restore(); -- cgit v1.2.1