mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: claim support for all MIME types that are sub-class of image/x-dcraw in raw plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8cb5d4a739
commit
2aa9fad079
1 changed files with 11 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "raw.h"
|
||||
|
||||
#include <QImage>
|
||||
#include <kmimetype.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <libraw/libraw.h>
|
||||
|
@ -170,8 +171,16 @@ QStringList RAWPlugin::keys() const
|
|||
|
||||
QList<QByteArray> RAWPlugin::mimeTypes() const
|
||||
{
|
||||
static const QList<QByteArray> list = QList<QByteArray>()
|
||||
<< "image/x-dcraw";
|
||||
static QList<QByteArray> list;
|
||||
if (list.isEmpty()) {
|
||||
foreach (const KMimeType::Ptr &mime, KMimeType::allMimeTypes()) {
|
||||
// NOTE: RAW MIME types are sub-class of image/x-dcraw
|
||||
if (mime->is(QString::fromLatin1("image/x-dcraw"))
|
||||
&& mime->name() != QLatin1String("image/x-dcraw")) {
|
||||
list.append(mime->name().toLatin1());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue