Skip to content

Commit 9e6817e

Browse files
committed
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 "".
1 parent 2754ef1 commit 9e6817e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/qt/test/test_main.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,22 @@
2323

2424
#include <openssl/ssl.h>
2525

26-
#if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
26+
#if defined(QT_STATICPLUGIN)
2727
#include <QtPlugin>
28+
#if QT_VERSION < 0x050000
2829
Q_IMPORT_PLUGIN(qcncodecs)
2930
Q_IMPORT_PLUGIN(qjpcodecs)
3031
Q_IMPORT_PLUGIN(qtwcodecs)
3132
Q_IMPORT_PLUGIN(qkrcodecs)
33+
#else
34+
#if defined(QT_QPA_PLATFORM_XCB)
35+
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
36+
#elif defined(QT_QPA_PLATFORM_WINDOWS)
37+
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
38+
#elif defined(QT_QPA_PLATFORM_COCOA)
39+
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
40+
#endif
41+
#endif
3242
#endif
3343

3444
extern void noui_connect();

0 commit comments

Comments
 (0)