From 5f2e76b8c777785a80f171d825cfddb213320f9a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 7 Oct 2011 10:46:56 -0400 Subject: [PATCH] Optionally include additional QT plugins when required to build. --- bitcoin-qt.pro | 5 +++++ src/init.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 473fb2778..e7e10f720 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 28be7ef7c..d6e153285 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;