Skip to content

Commit 5abd9b9

Browse files
committed
qt, build: Drop QT_STATICPLUGIN macro
Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's `QT_STATIC` macro. No need to handle both of them.
1 parent a6bef79 commit 5abd9b9

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

build-aux/m4/bitcoin_qt.m4

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
137137
fi
138138
fi
139139
140-
AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static])
141140
if test "$TARGET_OS" != "android"; then
142141
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
143142
AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])

build_msvc/bitcoin_config.h.in

-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@
7373
/* Define this symbol if the qt platform is windows */
7474
#define QT_QPA_PLATFORM_WINDOWS 1
7575

76-
/* Define this symbol if qt plugins are static */
77-
#define QT_STATICPLUGIN 1
78-
7976
/* Windows Universal Platform constraints */
8077
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
8178
/* Either a desktop application without API restrictions, or and older system

src/qt/bitcoin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#include <QTranslator>
6161
#include <QWindow>
6262

63-
#if defined(QT_STATICPLUGIN)
63+
#if defined(QT_STATIC)
6464
#include <QtPlugin>
6565
#if defined(QT_QPA_PLATFORM_XCB)
6666
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);

src/qt/guiutil.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <config/bitcoin-config.h> // IWYU pragma: keep
6-
75
#include <qt/guiutil.h>
86

97
#include <qt/bitcoinaddressvalidator.h>
@@ -918,12 +916,7 @@ void LogQtInfo()
918916
#else
919917
const std::string qt_link{"dynamic"};
920918
#endif
921-
#ifdef QT_STATICPLUGIN
922-
const std::string plugin_link{"static"};
923-
#else
924-
const std::string plugin_link{"dynamic"};
925-
#endif
926-
LogPrintf("Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString(), plugin_link);
919+
LogPrintf("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString());
927920
const auto static_plugins = QPluginLoader::staticPlugins();
928921
if (static_plugins.empty()) {
929922
LogPrintf("No static plugins.\n");

src/qt/test/test_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include <functional>
3030

31-
#if defined(QT_STATICPLUGIN)
31+
#if defined(QT_STATIC)
3232
#include <QtPlugin>
3333
#if defined(QT_QPA_PLATFORM_MINIMAL)
3434
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);

0 commit comments

Comments
 (0)