From 0751d0b0187f113d319c6680ba0110626507d8bc Mon Sep 17 00:00:00 2001 From: Martin Sandsmark Date: Thu, 9 Aug 2012 03:27:11 +0200 Subject: [PATCH] Use a saner check for multimedia files in infopanel. Don't rely on the reported supported mimetypes from Phonon, Phonon supports more than just video and audio, but if it is video or audio there's a very good chance Phonon supports it. (If the mime type isn't in the list returned by Phonon there's still a good chance it supports it, because mime types are stupid.) BUG: 252539 FIXED-IN: 4.9.1 (cherry picked from commit 2fb4419de053c43a0a70ffb21920db687fa87b6e) --- src/panels/information/informationpanelcontent.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index c03a5a4e2..39ed1d2bd 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -197,9 +197,7 @@ void InformationPanelContent::showItem(const KFileItem& item) if (InformationPanelSettings::previewsShown()) { const QString mimeType = item.mimetype(); - const bool usePhonon = Phonon::BackendCapabilities::isMimeTypeAvailable(mimeType) && - (mimeType != "image/png"); // TODO: workaround, as Phonon - // thinks it supports PNG images + const bool usePhonon = mimeType.startsWith("audio/") || mimeType.startsWith("video/"); if (usePhonon) { m_phononWidget->show(); m_phononWidget->setUrl(item.targetUrl()); -- 2.47.3