From fbad8e7701708c07bfbae73e6c3158fd9e560ee7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 5 Feb 2019 13:16:25 +0100 Subject: Fix deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: qsvgiconengine.cpp: In member function ‘virtual QPixmap QSvgIconEngine::pixmap(const QSize&, QIcon::Mode, QIcon::State)’: qsvgiconengine.cpp:200:38: warning: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] tst_qsvgrenderer.cpp:479:54: warning: ‘const QMatrix& QPainter::worldMatrix() const’ is deprecated: Use worldTransform() instead [-Wdeprecated-declarations] ... glwidget.cpp: In member function ‘void GLWidget::draw()’: glwidget.cpp:231:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] glwidget.cpp:232:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] fluidlauncher.cpp:71:65: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] Change-Id: Iae20d950c3118d05f91202c8020dbd81fa73b48f Reviewed-by: Eirik Aavitsland --- tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index 553838e..30d6712 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -476,15 +476,15 @@ void tst_QSvgRenderer::matrixForElement() const QPainter painter(&image); QSvgRenderer renderer(data); - compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("ichi")))); + compareTransforms(painter.worldTransform(), QTransform(renderer.matrixForElement(QLatin1String("ichi")))); painter.translate(-3, 1); - compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("ni")))); + compareTransforms(painter.worldTransform(), QTransform(renderer.matrixForElement(QLatin1String("ni")))); painter.rotate(45); - compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("san")))); + compareTransforms(painter.worldTransform(), QTransform(renderer.matrixForElement(QLatin1String("san")))); painter.scale(4, 2); - compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("yon")))); - painter.setWorldMatrix(QMatrix(1, 2, 3, 4, 5, 6), true); - compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("firkant")))); + compareTransforms(painter.worldTransform(), QTransform(renderer.matrixForElement(QLatin1String("yon")))); + painter.setWorldTransform(QTransform(1, 2, 3, 4, 5, 6), true); + compareTransforms(painter.worldTransform(), QTransform(renderer.matrixForElement(QLatin1String("firkant")))); } void tst_QSvgRenderer::boundsOnElement() const -- cgit v1.2.1