From 0fda43cf33cc7715f16d8764c4d96c6f88238712 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 16 Apr 2020 17:42:00 +0200 Subject: Remove deprecated members from QtGui/image classes Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b Reviewed-by: Shawn Rutledge --- tests/auto/gui/image/qimage/tst_qimage.cpp | 28 -------------------- .../gui/image/qimagewriter/tst_qimagewriter.cpp | 7 ----- .../gui/image/qpixmapcache/tst_qpixmapcache.cpp | 30 ---------------------- tests/auto/other/macgui/tst_macgui.cpp | 8 +++++- 4 files changed, 7 insertions(+), 66 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index fe998c7d92..9455e2b6e8 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -70,8 +70,6 @@ private slots: void setAlphaChannel_data(); void setAlphaChannel(); - void alphaChannel(); - void convertToFormat_data(); void convertToFormat(); void convertToFormatWithColorTable(); @@ -544,32 +542,6 @@ void tst_QImage::setAlphaChannel() } } QVERIFY(allPixelsOK); - - QImage outAlpha = image.alphaChannel(); - QCOMPARE(outAlpha.size(), image.size()); - - bool allAlphaOk = true; - for (int y=0; y #include #include +#include #include @@ -53,7 +54,12 @@ private slots: QPixmap grabWindowContents(QWidget * widget) { - return QPixmap::grabWindow(widget->winId()); + QScreen *screen = widget->window()->windowHandle()->screen(); + if (!screen) { + qWarning() << "Grabbing pixmap failed, no QScreen for" << widget; + return QPixmap(); + } + return screen->grabWindow(widget->winId()); } /* -- cgit v1.2.3