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 4f296cfb authored by David Faure's avatar David Faure

Also check parent mimetypes in protocolForArchiveMimetype().

This fixes opening of JAR archives with the zip ioslave.

REVIEW: 101455
BUG: 188989
FIXED-IN: 4.9.4
parent fbda9688
......@@ -47,6 +47,7 @@
#include <ksharedconfig.h>
#include <kstandarddirs.h>
#include <kurl.h>
#include <kmimetype.h>
#include <kmimetypetrader.h>
#include <kprotocolinfofactory.h>
......@@ -1189,7 +1190,23 @@ QString KProtocolManager::protocolForArchiveMimetype( const QString& mimeType )
return d->protocolForArchiveMimetypes.value(mimeType);
const QString prot = d->protocolForArchiveMimetypes.value(mimeType);
if (!prot.isEmpty())
return prot;
// Check parent mimetypes
KMimeType::Ptr mime = KMimeType::mimeType(mimeType);
if (mime) {
const QStringList parentMimeTypes = mime->allParentMimeTypes();
Q_FOREACH(const QString& parentMimeType, parentMimeTypes) {
const QString res = d->protocolForArchiveMimetypes.value(parentMimeType);
if (!res.isEmpty()) {
return res;
return QString();
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