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 "raw.h"
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
#include <kmimetype.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
|
|
||||||
#include <libraw/libraw.h>
|
#include <libraw/libraw.h>
|
||||||
|
@ -170,8 +171,16 @@ QStringList RAWPlugin::keys() const
|
||||||
|
|
||||||
QList<QByteArray> RAWPlugin::mimeTypes() const
|
QList<QByteArray> RAWPlugin::mimeTypes() const
|
||||||
{
|
{
|
||||||
static const QList<QByteArray> list = QList<QByteArray>()
|
static QList<QByteArray> list;
|
||||||
<< "image/x-dcraw";
|
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;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue