From dc939f3cf536838ce51620e3450f9be66cb1e32a Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 9 Nov 2009 15:27:20 +0000 Subject: 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 --- demos/qmediaplayer/mediaplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12