summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2016-09-06 12:46:51 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2016-09-06 13:15:06 (GMT)
commit93bc279101e42b768a76e3ff43b524c4a0740be7 (patch)
tree53dfd951ffbde44e50e5c37187352ac0e04fbf64
parent0e324a1508be5d86dbe4ff66212719dabe18c887 (diff)
Remove deprecated KImageIO::mimeTypes
-rw-r--r--lib/mimetypeutils.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mimetypeutils.cpp b/lib/mimetypeutils.cpp
index 9b9e0eb..580f942 100644
--- a/lib/mimetypeutils.cpp
+++ b/lib/mimetypeutils.cpp
@@ -27,13 +27,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <QDebug>
#include <QUrl>
#include <QMimeDatabase>
+#include <QImageReader>
// KDE
#include <KFileItem>
#include <KIO/Job>
#include <KIO/JobClasses>
#include <KIO/NetAccess>
-#include <KImageIO>
// Local
#include <archiveutils.h>
@@ -85,8 +85,10 @@ const QStringList& rasterImageMimeTypes()
{
static QStringList list;
if (list.isEmpty()) {
- list = KImageIO::mimeTypes(KImageIO::Reading);
- resolveAliasInList(&list);
+ auto supported = QImageReader::supportedMimeTypes();
+ for (auto mime: qAsConst(supported)) {
+ list << resolveAlias(QString::fromUtf8(mime));
+ }
// We don't want svg images to be considered as raster images
Q_FOREACH(const QString& mimeType, svgImageMimeTypes()) {
list.removeOne(mimeType);