From 582980b6fe2b77c3a6f1ec828c498871b00465d4 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 14 Mar 2017 20:45:00 -0400 Subject: [PATCH] Add new test_bitcoin-qt static library dependencies Avoids following error when qt is statically linked into the test binary, as on travis: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "". --- src/qt/test/test_main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 84769f7ba7c..5c62e9c67e3 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -24,6 +24,24 @@ #include +#if defined(QT_STATICPLUGIN) +#include +#if QT_VERSION < 0x050000 +Q_IMPORT_PLUGIN(qcncodecs) +Q_IMPORT_PLUGIN(qjpcodecs) +Q_IMPORT_PLUGIN(qtwcodecs) +Q_IMPORT_PLUGIN(qkrcodecs) +#else +#if defined(QT_QPA_PLATFORM_XCB) +Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); +#elif defined(QT_QPA_PLATFORM_WINDOWS) +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); +#elif defined(QT_QPA_PLATFORM_COCOA) +Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); +#endif +#endif +#endif + extern void noui_connect(); static int qt_argc = 1;