aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-03-01 17:43:10 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-08-01 14:01:07 +0100
commitb3d3ae0680e7529853413de045aa9fbd7ac51e5c (patch)
tree2e08a740243467c450ea88adf925da3c650af148
parentebd82fa9fae13d5a7a395800295dd7fd34185b58 (diff)
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.
-rw-r--r--build-aux/m4/bitcoin_qt.m41
-rw-r--r--build_msvc/bitcoin_config.h.in3
-rw-r--r--src/qt/bitcoin.cpp2
-rw-r--r--src/qt/guiutil.cpp9
-rw-r--r--src/qt/test/test_main.cpp2
5 files changed, 3 insertions, 14 deletions
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index b87c38a6ab..7498127860 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -123,7 +123,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
fi
fi
- AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static])
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])
if test "$TARGET_OS" = "windows"; then
diff --git a/build_msvc/bitcoin_config.h.in b/build_msvc/bitcoin_config.h.in
index 2d6df92286..33632ad17c 100644
--- a/build_msvc/bitcoin_config.h.in
+++ b/build_msvc/bitcoin_config.h.in
@@ -73,9 +73,6 @@
/* Define this symbol if the qt platform is windows */
#define QT_QPA_PLATFORM_WINDOWS 1
-/* Define this symbol if qt plugins are static */
-#define QT_STATICPLUGIN 1
-
/* Windows Universal Platform constraints */
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
/* Either a desktop application without API restrictions, or and older system
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6c5725533b..690c2b6f5a 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -60,7 +60,7 @@
#include <QTranslator>
#include <QWindow>
-#if defined(QT_STATICPLUGIN)
+#if defined(QT_STATIC)
#include <QtPlugin>
#if defined(QT_QPA_PLATFORM_XCB)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index ee841ce626..80f8b8e80f 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -2,8 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <config/bitcoin-config.h> // IWYU pragma: keep
-
#include <qt/guiutil.h>
#include <qt/bitcoinaddressvalidator.h>
@@ -918,12 +916,7 @@ void LogQtInfo()
#else
const std::string qt_link{"dynamic"};
#endif
-#ifdef QT_STATICPLUGIN
- const std::string plugin_link{"static"};
-#else
- const std::string plugin_link{"dynamic"};
-#endif
- LogPrintf("Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString(), plugin_link);
+ LogPrintf("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString());
const auto static_plugins = QPluginLoader::staticPlugins();
if (static_plugins.empty()) {
LogPrintf("No static plugins.\n");
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index f310d0a02b..c150606cfb 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -28,7 +28,7 @@
#include <functional>
-#if defined(QT_STATICPLUGIN)
+#if defined(QT_STATIC)
#include <QtPlugin>
#if defined(QT_QPA_PLATFORM_MINIMAL)
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);