diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-11-09 15:27:20 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-11-09 18:35:57 (GMT) |
commit | dc939f3cf536838ce51620e3450f9be66cb1e32a (patch) | |
tree | 09268f64a9d897b0520c79d92201a2f5fd2d2394 /demos | |
parent | 7c8676c35df44404aa30824ae7856408c3c5a629 (diff) | |
download | Qt-dc939f3cf536838ce51620e3450f9be66cb1e32a.zip Qt-dc939f3cf536838ce51620e3450f9be66cb1e32a.tar.gz Qt-dc939f3cf536838ce51620e3450f9be66cb1e32a.tar.bz2 |
Mediaplayer now pauses playback before displaying error dialog
This change improves the user experience - previously, video playback
would continue in the background, while the user read the dialog.
Then, when the dialog was dismissed, video playback would pause.
Reviewed-by: Frans Englich
Diffstat (limited to 'demos')
-rw-r--r-- | demos/qmediaplayer/mediaplayer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp index 624bab7..8a5420f 100644 --- a/demos/qmediaplayer/mediaplayer.cpp +++ b/demos/qmediaplayer/mediaplayer.cpp @@ -355,13 +355,13 @@ void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate) switch (newstate) { case Phonon::ErrorState: - QMessageBox::warning(this, "Phonon Mediaplayer", m_MediaObject.errorString(), QMessageBox::Close); if (m_MediaObject.errorType() == Phonon::FatalError) { playButton->setEnabled(false); rewindButton->setEnabled(false); } else { m_MediaObject.pause(); } + QMessageBox::warning(this, "Phonon Mediaplayer", m_MediaObject.errorString(), QMessageBox::Close); break; case Phonon::PausedState: case Phonon::StoppedState: |