summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-05-02 11:15:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-02 04:59:17 +0200
commitb36e2f5209e1278eb3b671cd14d23dc565ee2bae (patch)
tree435c7265334e176739020c0ecfb2c4a50411ff0a /tests
parentb7935a84d71b479f5320e5b062274d344835ba26 (diff)
downloadqtmultimedia-b36e2f5209e1278eb3b671cd14d23dc565ee2bae.tar.gz
Replaced QMediaRecorderControl::play/stop/pause with setState
This allows to introduce new states without breaking BC. Change-Id: I03c064cec92d6745b251a51cfb301e7f01f4b765 Reviewed-by: Ling Hu <ling.hu@nokia.com>
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)