Use new plugin system in QtImageFormats.
Change-Id: Ib1d37b12d35db19f3b12d1881d29d3e0154d414d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
2e2fa4802f
commit
94aed3b580
|
@ -56,7 +56,10 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QMngPlugin : public QImageIOPlugin
|
||||
{
|
||||
public:
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "mng.json")
|
||||
|
||||
public:
|
||||
QStringList keys() const;
|
||||
Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
|
||||
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const;
|
||||
|
@ -90,9 +93,8 @@ QImageIOHandler *QMngPlugin::create(QIODevice *device, const QByteArray &format)
|
|||
return hand;
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QMngPlugin)
|
||||
Q_EXPORT_PLUGIN2(qmng, QMngPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
||||
#endif // !QT_NO_IMAGEFORMATPLUGIN
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Keys": [ "mng" ]
|
||||
}
|
|
@ -5,6 +5,7 @@ load(qt_plugin)
|
|||
|
||||
HEADERS += qmnghandler_p.h
|
||||
SOURCES += qmnghandler.cpp
|
||||
OTHER_FILES += mng.json
|
||||
contains(QT_CONFIG, system-mng) {
|
||||
if(unix|win32-g++*):LIBS += -lmng
|
||||
else:win32: LIBS += libmng.lib
|
||||
|
|
|
@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QTgaPlugin : public QImageIOPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "tga.json")
|
||||
|
||||
public:
|
||||
Capabilities capabilities(QIODevice * device, const QByteArray & format) const;
|
||||
QImageIOHandler * create(QIODevice * device, const QByteArray & format = QByteArray()) const;
|
||||
|
@ -88,8 +91,8 @@ QStringList QTgaPlugin::keys() const
|
|||
return QStringList() << QLatin1String("tga");
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN2(qtga, QTgaPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
||||
#endif /* QT_NO_IMAGEFORMATPLUGIN */
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Keys": [ "tga" ]
|
||||
}
|
|
@ -5,6 +5,7 @@ HEADERS += qtgahandler.h \
|
|||
qtgafile.h
|
||||
SOURCES += qtgahandler.cpp \
|
||||
qtgafile.cpp
|
||||
OTHER_FILES += tga.json
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
|
|
|
@ -53,6 +53,9 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QTiffPlugin : public QImageIOPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "tiff.json")
|
||||
|
||||
public:
|
||||
Capabilities capabilities(QIODevice * device, const QByteArray & format) const;
|
||||
QImageIOHandler * create(QIODevice * device, const QByteArray & format = QByteArray()) const;
|
||||
|
@ -89,9 +92,8 @@ QStringList QTiffPlugin::keys() const
|
|||
return QStringList() << QLatin1String("tiff") << QLatin1String("tif");
|
||||
}
|
||||
|
||||
Q_EXPORT_STATIC_PLUGIN(QTiffPlugin)
|
||||
Q_EXPORT_PLUGIN2(qtiff, QTiffPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
||||
#endif /* QT_NO_IMAGEFORMATPLUGIN */
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Keys": [ "tiff", "tif" ]
|
||||
}
|
|
@ -5,6 +5,7 @@ load(qt_plugin)
|
|||
|
||||
include(qtiffhandler.pri)
|
||||
SOURCES += main.cpp
|
||||
OTHER_FILES += tiff.json
|
||||
|
||||
DESTDIR = $$QT.gui.plugins/imageformats
|
||||
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
|
||||
|
|
Loading…
Reference in New Issue