aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsganimatedimage
diff options
context:
space:
mode:
authorMatthew Cattell <matthew.cattell@nokia.com>2011-09-09 14:50:48 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-09-09 15:02:36 +0200
commit4153ee1b391438d25d0860c5174039f8ad7b8fc5 (patch)
tree2ec32b5e5494c8ae63d492cb0d95c1c0c5b21643 /tests/auto/declarative/qsganimatedimage
parentd93cc35d4ff1643ac9c41e8b3cbcc06bbac1894f (diff)
fixup tests to build with refactor
Change-Id: Iab4adc9e19fab67402918bb737fff2fce6c292bd Reviewed-on: http://codereview.qt-project.org/4545 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qsganimatedimage')
-rw-r--r--tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp b/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp
index 8964057ab6..0c927c2c5c 100644
--- a/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp
+++ b/tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp
@@ -154,9 +154,10 @@ void tst_qsganimatedimage::mirror_running()
int width = anim->property("width").toInt();
QCOMPARE(anim->currentFrame(), 0);
- QPixmap frame0 = canvas->renderPixmap();
+ QPixmap frame0 = QPixmap::fromImage(canvas->grabFrameBuffer());
+
anim->setCurrentFrame(1);
- QPixmap frame1 = canvas->renderPixmap();
+ QPixmap frame1 = QPixmap::fromImage(canvas->grabFrameBuffer());
anim->setCurrentFrame(0);
@@ -167,11 +168,11 @@ void tst_qsganimatedimage::mirror_running()
anim->setProperty("mirror", true);
QCOMPARE(anim->currentFrame(), 1);
- QPixmap frame1_flipped = canvas->renderPixmap();
+ QPixmap frame1_flipped = QPixmap::fromImage(canvas->grabFrameBuffer());
QTRY_VERIFY(spy.count() == 1); spy.clear();
QCOMPARE(anim->currentFrame(), 0); // animation only has 2 frames, should cycle back to first
- QPixmap frame0_flipped = canvas->renderPixmap();
+ QPixmap frame0_flipped = QPixmap::fromImage(canvas->grabFrameBuffer());
QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved", SkipSingle);
@@ -198,7 +199,7 @@ void tst_qsganimatedimage::mirror_notRunning()
QVERIFY(anim);
int width = anim->property("width").toInt();
- QPixmap screenshot = canvas->renderPixmap();
+ QPixmap screenshot = QPixmap::fromImage(canvas->grabFrameBuffer());
QTransform transform;
transform.translate(width, 0).scale(-1, 1.0);
@@ -209,7 +210,7 @@ void tst_qsganimatedimage::mirror_notRunning()
bool paused = anim->isPlaying();
anim->setProperty("mirror", true);
- screenshot = canvas->renderPixmap();
+ screenshot = QPixmap::fromImage(canvas->grabFrameBuffer());
QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved", SkipSingle);
QCOMPARE(screenshot, expected);