forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user