summaryrefslogtreecommitdiffstats
path: root/src/multimedia/qml/qmlaudio.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-02-05 01:16:31 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-02-05 01:16:31 (GMT)
commit1b9b3fc62da13adc667890a84c61cc873fb941c0 (patch)
tree3034c455575fc51fe3ae4096ac954848beafbd0a /src/multimedia/qml/qmlaudio.cpp
parent5fae580d87add7fab16a9bda20bcc5e42df02879 (diff)
downloadQt-1b9b3fc62da13adc667890a84c61cc873fb941c0.zip
Qt-1b9b3fc62da13adc667890a84c61cc873fb941c0.tar.gz
Qt-1b9b3fc62da13adc667890a84c61cc873fb941c0.tar.bz2
Make the paused property of the QML media elements indepent of playing.
Diffstat (limited to 'src/multimedia/qml/qmlaudio.cpp')
-rw-r--r--src/multimedia/qml/qmlaudio.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qmlaudio.cpp
index adff49b..f56b6c3 100644
--- a/src/multimedia/qml/qmlaudio.cpp
+++ b/src/multimedia/qml/qmlaudio.cpp
@@ -86,8 +86,13 @@ QmlAudio::~QmlAudio()
*/
void QmlAudio::play()
-{
+{
m_playerControl->play();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
}
/*!
@@ -99,6 +104,11 @@ void QmlAudio::play()
void QmlAudio::pause()
{
m_playerControl->pause();
+
+ if (!m_paused && m_state == QMediaPlayer::PausedState) {
+ m_paused = true;
+ emit pausedChanged();
+ }
}
/*!
@@ -110,6 +120,11 @@ void QmlAudio::pause()
void QmlAudio::stop()
{
m_playerControl->stop();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
}
/*!