Skip to content

Commit

Permalink
qt, build: Drop QT_STATICPLUGIN macro
Browse files Browse the repository at this point in the history
Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's
`QT_STATIC` macro. No need to handle both of them.
  • Loading branch information
hebasto committed Aug 1, 2024
1 parent ebd82fa commit b3d3ae0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion build-aux/m4/bitcoin_qt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions build_msvc/bitcoin_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 1 addition & 8 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/qt/test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b3d3ae0

Please sign in to comment.