summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/baselineexample
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-20 16:11:05 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-20 16:47:11 +0200
commit6ae168f8ceacb36bed4a26d39884554d42f6bef6 (patch)
tree3a95ffa0aaa47fbc1f0abe5aa07ced8215e698d1 /tests/auto/other/baselineexample
parent195df6e8e0ffb2636cfe395f560eb73c05a54b61 (diff)
Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().
Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Diffstat (limited to 'tests/auto/other/baselineexample')
-rw-r--r--tests/auto/other/baselineexample/tst_baselineexample.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/other/baselineexample/tst_baselineexample.cpp b/tests/auto/other/baselineexample/tst_baselineexample.cpp
index be4d815244..78e531a9f7 100644
--- a/tests/auto/other/baselineexample/tst_baselineexample.cpp
+++ b/tests/auto/other/baselineexample/tst_baselineexample.cpp
@@ -71,7 +71,7 @@ void tst_BaselineExample::testBasicUsage()
b.resize(100, 50);
b.show();
QTest::qWaitForWindowShown(&b);
- QImage img1 = QPixmap::grabWidget(&b).toImage();
+ QImage img1 = b.grab().toImage();
QVERIFY(!img1.isNull());
// Compare it to baseline on server:
@@ -85,11 +85,11 @@ void tst_BaselineExample::testMultipleImages()
b.resize(100, 50);
b.show();
QTest::qWaitForWindowShown(&b);
- QBASELINE_CHECK(QPixmap::grabWidget(&b).toImage(), "text1");
+ QBASELINE_CHECK(b.grab().toImage(), "text1");
b.setText("Kick me!");
QTest::qWait(50);
- QBASELINE_CHECK(QPixmap::grabWidget(&b).toImage(), "text2");
+ QBASELINE_CHECK(b.grab().toImage(), "text2");
}
@@ -111,7 +111,7 @@ void tst_BaselineExample::testDataDriven()
b.resize(100, 50);
b.show();
QTest::qWaitForWindowShown(&b);
- QBASELINE_TEST(QPixmap::grabWidget(&b).toImage());
+ QBASELINE_TEST(b.grab().toImage());
}
@@ -137,7 +137,7 @@ void tst_BaselineExample::testDataDrivenChecksum()
b.resize(100, 50);
b.show();
QTest::qWaitForWindowShown(&b);
- QBASELINE_TEST(QPixmap::grabWidget(&b).toImage());
+ QBASELINE_TEST(b.grab().toImage());
}