Skip to content

Commit 7346b01

Browse files
committed
qt, build: remove unneeded Q_IMPORT_PLUGIN macro calls
After the recent full removal of Autotools (PR #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.
1 parent a74bdee commit 7346b01

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)