aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-03-14 20:45:00 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-03-15 13:02:02 -0400
commit9e6817ed1146a340543de96b36d9eaee5d5ced7d (patch)
treefbdb2ba01e24d93af8538f759b3a97aff74e75b4 /src/qt
parent2754ef1c4a8cd7415f9ac2d3660ce6e4545b2754 (diff)
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 "".
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/test/test_main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index 8a475405e0..d8bcfedb7c 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -23,12 +23,22 @@
#include <openssl/ssl.h>
-#if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
+#if defined(QT_STATICPLUGIN)
#include <QtPlugin>
+#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();