Commit 93bc2791 authored by Frederik Gladhorn's avatar Frederik Gladhorn
Browse files

Remove deprecated KImageIO::mimeTypes

parent 0e324a15
......@@ -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);
......
Supports Markdown
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