Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit b0f92177 authored by Michael Pyne's avatar Michael Pyne

Add some kind of informative error message if a file cannot be played since I've been seeing

situations (which I cannot reproduce :( ) where JuK will just stop playing for no reason which I
suspect is rooted in here somewhere.

Adds a new string so I guess we'll see how the Semantic Markup fares. :)

svn path=/trunk/KDE/kdemultimedia/juk/; revision=831187
parent d28b2104
......@@ -477,6 +477,15 @@ void PlayerManager::slotTick(qint64 msec)
void PlayerManager::slotStateChanged(Phonon::State newstate)
if(newstate == Phonon::ErrorState) {
QString errorMessage =
"%1 will be the /path/to/file, %2 will be some string from Phonon describing the error",
"JuK is unable to play the audio file<nl><filename>%1</filename><nl>"
"for the following reason:<nl><message>%2</message>",
switch(m_media->errorType()) {
case Phonon::NoError:
kDebug() << "received a state change to ErrorState but errorType is NoError!?";
......@@ -484,13 +493,13 @@ void PlayerManager::slotStateChanged(Phonon::State newstate)
case Phonon::NormalError:
KMessageBox::information(0, m_media->errorString());
KMessageBox::information(0, errorMessage);
case Phonon::FatalError:
// stop playback
KMessageBox::sorry(0, m_media->errorString());
KMessageBox::sorry(0, errorMessage);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment