Fixed plugin loading (LD_PRELOAD isn't required anymore)
This commit is contained in:
2
Makefile
2
Makefile
@@ -59,7 +59,7 @@ gitignore:
|
|||||||
sed 's/^./\/&/' >> .gitignore
|
sed 's/^./\/&/' >> .gitignore
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -Dm644 src/libnmi.so $(DESTDIR)/usr/local/Kobo/plugins/libnmi.so
|
install -Dm644 src/libnmi.so $(DESTDIR)/usr/local/Kobo/imageformats/libnmi.so
|
||||||
install -Dm644 res/doc $(DESTDIR)/mnt/onboard/.adds/nmi/doc
|
install -Dm644 res/doc $(DESTDIR)/mnt/onboard/.adds/nmi/doc
|
||||||
|
|
||||||
koboroot:
|
koboroot:
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
#include <QImageIOHandler>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
class NMIPlugin : public QObject {
|
// we make it a fake image plugin so we can have Qt automatically load it
|
||||||
|
// without needing extra configuration (e.g. LD_PRELOAD, -plugin arg, etc).
|
||||||
|
|
||||||
|
class NMIPlugin : public QImageIOPlugin {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "net.pgaskin.nmi");
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface")
|
||||||
|
public:
|
||||||
|
Capabilities capabilities(QIODevice*, QByteArray const&) const { return 0; };
|
||||||
|
QImageIOHandler *create(QIODevice*, QByteArray const& = QByteArray()) const { return 0; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user