aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-02 11:26:08 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-02 11:04:03 +0000
commit814601e9cdf5895152cedcd1968fd2a4eecd3cd3 (patch)
tree37a36a915715f752e86f20a7310447d201cd47ac /tests
parent43419084fe3c7489adcca3307b2643f70bd7094c (diff)
Doc: tweak BusyIndicator's GIF
Make it running at start to ensure that the first frame serves as a good screenshot. When GIF animations were disabled (Qt Creator), the first frame was empty. Change-Id: I2a0acf0cf428a0175c141a7841ec327bc15dfade Task-number: QTBUG-55904 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/gifs/data/qtquickcontrols2-busyindicator.qml2
-rw-r--r--tests/manual/gifs/tst_gifs.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/gifs/data/qtquickcontrols2-busyindicator.qml b/tests/manual/gifs/data/qtquickcontrols2-busyindicator.qml
index f4a51afb..5c655cab 100644
--- a/tests/manual/gifs/data/qtquickcontrols2-busyindicator.qml
+++ b/tests/manual/gifs/data/qtquickcontrols2-busyindicator.qml
@@ -51,7 +51,7 @@ Window {
BusyIndicator {
id: busyIndicator
- running: false
+ running: true
anchors.centerIn: parent
}
}
diff --git a/tests/manual/gifs/tst_gifs.cpp b/tests/manual/gifs/tst_gifs.cpp
index 5cb1f109..d3fb5f6d 100644
--- a/tests/manual/gifs/tst_gifs.cpp
+++ b/tests/manual/gifs/tst_gifs.cpp
@@ -352,7 +352,7 @@ void tst_Gifs::busyIndicator()
GifRecorder gifRecorder;
gifRecorder.setDataDirPath(dataDirPath);
gifRecorder.setOutputDir(outputDir);
- gifRecorder.setRecordingDuration(3);
+ gifRecorder.setRecordingDuration(6);
gifRecorder.setHighQuality(true);
gifRecorder.setQmlFileName("qtquickcontrols2-busyindicator.qml");
@@ -360,17 +360,17 @@ void tst_Gifs::busyIndicator()
QQuickWindow *window = gifRecorder.window();
// Record nothing for a bit to make it smoother.
- QTest::qWait(400);
+ QTest::qWait(800 * 2);
QQuickItem *busyIndicator = window->property("busyIndicator").value<QQuickItem*>();
QVERIFY(busyIndicator);
- busyIndicator->setProperty("running", true);
+ busyIndicator->setProperty("running", false);
// 800 ms is the duration of one rotation animation cycle for BusyIndicator.
QTest::qWait(800 * 2);
- busyIndicator->setProperty("running", false);
+ busyIndicator->setProperty("running", true);
gifRecorder.waitForFinish();
}