aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPal Toth <pal.toth@kdab.com>2017-09-12 12:49:40 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2017-09-13 09:17:11 +0000
commitbb02a577f0fbf3bd2a273129e6cb57cfc9a338c8 (patch)
tree947d5a10e21fd3b6896f63c3175f6b92b6e5fe12 /tests
parentfa00f0a0206f87b43cd1ee5448efe20cb6ff8e44 (diff)
Add NOTIFY signal for QQuickAnimatedImage::frameCount
Task-number: QTBUG-62913 Change-Id: Ib561e0ab6582c1df41ae1c75ba304377c00d63f0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
index 34b9fb6b07..e303495944 100644
--- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
+++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
@@ -132,6 +132,16 @@ void tst_qquickanimatedimage::frameCount()
QVERIFY(anim->isPlaying());
QCOMPARE(anim->frameCount(), 3);
+ QSignalSpy frameCountChangedSpy(anim, &QQuickAnimatedImage::frameCountChanged);
+
+ const QUrl origSource = anim->source();
+ anim->setSource(QUrl());
+ QCOMPARE(anim->frameCount(), 0);
+ QCOMPARE(frameCountChangedSpy.count(), 1);
+ anim->setSource(origSource);
+ QCOMPARE(anim->frameCount(), 3);
+ QCOMPARE(frameCountChangedSpy.count(), 2);
+
delete anim;
}