aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/gifs/gifrecorder.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-08-21 14:03:44 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2015-08-28 06:54:30 +0000
commit4c82daeb48d1668313d316be4c664d608bd98028 (patch)
tree12e52b56eb7c25a23c0f834d4d3891f6a2492496 /tests/manual/gifs/gifrecorder.cpp
parentff1d39de871c23b3475a517427712a5dd028468e (diff)
GifRecorder: add some indication of when recordings are finished.
This is important for high quality recordings, where there is some conversion that must be done after the recording. If we don't do this, it's hard to get a good idea of when the recording actually finishes. Change-Id: Iafb73358288e50d8f070607f8d69602da6d32506 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/manual/gifs/gifrecorder.cpp')
-rw-r--r--tests/manual/gifs/gifrecorder.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/manual/gifs/gifrecorder.cpp b/tests/manual/gifs/gifrecorder.cpp
index 78981e78..8d1b6a8c 100644
--- a/tests/manual/gifs/gifrecorder.cpp
+++ b/tests/manual/gifs/gifrecorder.cpp
@@ -37,6 +37,8 @@
#include "gifrecorder.h"
#include <QLoggingCategory>
+#include <QQmlComponent>
+#include <QQuickItem>
#include <QtTest>
/*!
@@ -228,6 +230,17 @@ void GifRecorder::waitForFinish()
}
if (mHighQuality) {
+ // Indicate the end of recording and the beginning of conversion.
+ QQmlComponent busyComponent(mView->engine());
+ busyComponent.setData("import QtQuick 2.6; import QtQuick.Controls 2.0; Rectangle { anchors.fill: parent; " \
+ "BusyIndicator { width: 32; height: 32; anchors.centerIn: parent } }", QUrl());
+ QCOMPARE(busyComponent.status(), QQmlComponent::Ready);
+ QQuickItem *busyRect = qobject_cast<QQuickItem*>(busyComponent.create());
+ QVERIFY(busyRect);
+ busyRect->setParentItem(mView->rootObject());
+ QSignalSpy spy(mView, SIGNAL(frameSwapped()));
+ QVERIFY(spy.wait());
+
QProcess avconvProcess;
QProcess convertProcess;
avconvProcess.setStandardOutputProcess(&convertProcess);