summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/unit/qmultimedia_common/mockmediarecordercontrol.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/unit/qmultimedia_common/mockmediarecordercontrol.h b/tests/auto/unit/qmultimedia_common/mockmediarecordercontrol.h
index 68723a714..00f7b2f87 100644
--- a/tests/auto/unit/qmultimedia_common/mockmediarecordercontrol.h
+++ b/tests/auto/unit/qmultimedia_common/mockmediarecordercontrol.h
@@ -130,6 +130,22 @@ public slots:
emit statusChanged(m_status);
}
+ void setState(QMediaRecorder::State state)
+ {
+ switch (state) {
+ case QMediaRecorder::StoppedState:
+ stop();
+ break;
+ case QMediaRecorder::PausedState:
+ pause();
+ break;
+ case QMediaRecorder::RecordingState:
+ record();
+ break;
+ }
+ }
+
+
void setMuted(bool muted)
{
if (m_muted != muted)