diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 473fb277..e7e10f72 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -47,6 +47,11 @@ contains(USE_SSL, 1) { DEFINES += USE_SSL } +contains(BITCOIN_NEED_QT_PLUGINS, 1) { + DEFINES += BITCOIN_NEED_QT_PLUGINS + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs +} + # for extra security against potential buffer overflows QMAKE_CXXFLAGS += -fstack-protector QMAKE_LFLAGS += -fstack-protector diff --git a/src/init.cpp b/src/init.cpp index 28be7ef7..d6e15328 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -12,6 +12,16 @@ #include #include +#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED) +#define _BITCOIN_QT_PLUGINS_INCLUDED +#define __INSURE__ +#include +Q_IMPORT_PLUGIN(qcncodecs) +Q_IMPORT_PLUGIN(qjpcodecs) +Q_IMPORT_PLUGIN(qtwcodecs) +Q_IMPORT_PLUGIN(qkrcodecs) +#endif + using namespace std; using namespace boost;