Skip to content

Commit d6a1b94

Browse files
committed
Merge #834: qt, build: remove unneeded Q_IMPORT_PLUGIN macro calls
7346b01 qt, build: remove unneeded `Q_IMPORT_PLUGIN` macro calls (Sebastian Falbesoner) Pull request description: After the recent full removal of Autotools (PR [#30664](bitcoin/bitcoin#30664)), these macros are not needed anymore in the .cpp files according to the TODO in qt's CMakeLists.txt. Tested building on OpenBSD 7.5, where the XCB plugin was still imported according to the debug log: ``` 2024-09-02T21:13:27Z Bitcoin Core version v28.99.0-7346b0109208 (release build) 2024-09-02T21:13:27Z Qt 5.15.12 (dynamic), plugin=xcb 2024-09-02T21:13:27Z No static plugins. 2024-09-02T21:13:27Z Style: fusion / QFusionStyle 2024-09-02T21:13:27Z System: OpenBSD 7.5, x86_64-little_endian-lp64 ``` ACKs for top commit: hebasto: ACK 7346b01. Tree-SHA512: ffa033fc6e0412a99d2c167044cc7af89512a731172d6911db71434f5353e811802c268d853a76d3732e9da954444cf6c39a852aeb25938c435826e117a16fca
2 parents 6852d1d + 7346b01 commit d6a1b94

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

src/qt/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ endif()
1313

1414
get_target_property(qt_lib_type Qt5::Core TYPE)
1515

16-
# TODO: After the transition from Autotools to CMake,
17-
# all `Q_IMPORT_PLUGIN` macros can be deleted from the
18-
# qt/bitcoin.cpp and qt/test/test_main.cpp source files.
1916
function(import_plugins target)
2017
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
2118
set(plugins Qt5::QMinimalIntegrationPlugin)

src/qt/bitcoin.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,6 @@
6060
#include <QTranslator>
6161
#include <QWindow>
6262

63-
#if defined(QT_STATIC)
64-
#include <QtPlugin>
65-
#if defined(QT_QPA_PLATFORM_XCB)
66-
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
67-
#elif defined(QT_QPA_PLATFORM_WINDOWS)
68-
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
69-
Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin);
70-
#elif defined(QT_QPA_PLATFORM_COCOA)
71-
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
72-
Q_IMPORT_PLUGIN(QMacStylePlugin);
73-
#elif defined(QT_QPA_PLATFORM_ANDROID)
74-
Q_IMPORT_PLUGIN(QAndroidPlatformIntegrationPlugin)
75-
#endif
76-
#endif
77-
7863
// Declare meta types used for QMetaObject::invokeMethod
7964
Q_DECLARE_METATYPE(bool*)
8065
Q_DECLARE_METATYPE(CAmount)

src/qt/test/test_main.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@
2828

2929
#include <functional>
3030

31-
#if defined(QT_STATIC)
32-
#include <QtPlugin>
33-
#if defined(QT_QPA_PLATFORM_MINIMAL)
34-
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
35-
#endif
36-
#if defined(QT_QPA_PLATFORM_XCB)
37-
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
38-
#elif defined(QT_QPA_PLATFORM_WINDOWS)
39-
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
40-
#elif defined(QT_QPA_PLATFORM_COCOA)
41-
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
42-
#elif defined(QT_QPA_PLATFORM_ANDROID)
43-
Q_IMPORT_PLUGIN(QAndroidPlatformIntegrationPlugin)
44-
#endif
45-
#endif
46-
4731
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
4832

4933
const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS{};

0 commit comments

Comments
 (0)