diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2012-05-02 11:15:44 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-02 04:59:17 +0200 |
commit | b36e2f5209e1278eb3b671cd14d23dc565ee2bae (patch) | |
tree | 435c7265334e176739020c0ecfb2c4a50411ff0a /tests | |
parent | b7935a84d71b479f5320e5b062274d344835ba26 (diff) | |
download | qtmultimedia-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.h | 16 |
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) |