From 6ae168f8ceacb36bed4a26d39884554d42f6bef6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Jul 2012 16:11:05 +0200 Subject: Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab(). Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be Reviewed-by: Sergio Ahumada --- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index b3d578ef3e..6fe8727294 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -444,7 +444,7 @@ void tst_QPixmap::fill_data() if (pm.x11PictureHandle()) { #elif defined (Q_OS_WINCE) QPixmap pixmap(1,1); - if (QPixmap::grabWidget(QApplication::desktop()).depth() >= 24) { + if (QApplication::desktop()->grab().depth() >= 24) { #else QPixmap pixmap(1, 1); { #endif @@ -742,7 +742,7 @@ void tst_QPixmap::grabWindow() child.setAutoFillBackground(true); child.show(); QTest::qWait(20); - const QPixmap grabWidgetPixmap = QPixmap::grabWidget(&child); + const QPixmap grabWidgetPixmap = child.grab(); const WId childWinId = child.winId(); // Create native child QVERIFY(QTest::qWaitForWindowExposed(child.windowHandle())); const QPixmap grabWindowPixmap = QPixmap::grabWindow(childWinId); -- cgit v1.2.3