ImageViewer: Add up-to-date mimetypes (and add webp mimetype)

The list of mimetypes was missing new types like tga, dds and webp.
Just ask QImageReader::supportedMimeTypes() for the supported types,
which is also easier to maintain.

Task-number: QTBUG-45061
Change-Id: I80573da868088915b8d746c56374786e5e36903c
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2015-03-18 16:04:10 +01:00
committed by hjk
parent ec9f3ee79e
commit 4514dbfd8c
4 changed files with 20 additions and 22 deletions

View File

@@ -38,6 +38,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/mimetypes/mimedatabase.h>
namespace ImageViewer {
namespace Internal {
@@ -49,6 +50,8 @@ bool ImageViewerPlugin::initialize(const QStringList &arguments, QString *errorM
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
Utils::MimeDatabase::addMimeTypes(QLatin1String(":/imageviewer/ImageViewer.mimetypes.xml"));
m_factory = new ImageViewerFactory(this);
addAutoReleasedObject(m_factory);
return true;