aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/test_main.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <[email protected]>2017-03-14 20:45:00 -0400
committerRussell Yanofsky <[email protected]>2017-03-15 13:02:02 -0400
commit9e6817ed1146a340543de96b36d9eaee5d5ced7d (patch)
treefbdb2ba01e24d93af8538f759b3a97aff74e75b4 /src/qt/test/test_main.cpp
parentAdd simple qt wallet test sending a transaction (diff)
downloaddiscoin-9e6817ed1146a340543de96b36d9eaee5d5ced7d.tar.xz
discoin-9e6817ed1146a340543de96b36d9eaee5d5ced7d.zip
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/test/test_main.cpp')
-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 8a475405e..d8bcfedb7 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();