Skip to content

Commit 8b0f608

Browse files
committed
qt5: tests: Make sure static plugin symbols are pulled in
Since we're now properly linking against static plugins for qt binaries, we need to ensure that they're Imported properly. Without these Imports, the linker drops some of the unused linked libs, causing undefined symbols in QtCore.
1 parent 47ffb50 commit 8b0f608

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/qt/test/test_main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
#include "bitcoin-config.h"
12
#include "paymentservertests.h"
23
#include "uritests.h"
34

45
#include <QCoreApplication>
56
#include <QObject>
67
#include <QTest>
78

9+
#if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
10+
#include <QtPlugin>
11+
Q_IMPORT_PLUGIN(qcncodecs)
12+
Q_IMPORT_PLUGIN(qjpcodecs)
13+
Q_IMPORT_PLUGIN(qtwcodecs)
14+
Q_IMPORT_PLUGIN(qkrcodecs)
15+
#endif
16+
817
// This is all you need to run all the tests
918
int main(int argc, char *argv[])
1019
{

0 commit comments

Comments
 (0)