Skip to content

Commit 357f195

Browse files
committed
Merge bitcoin#30567: qt, build: Drop QT_STATICPLUGIN macro
7231c76 qt: Replace deprecated LogPrintf with LogInfo in GUIUtil::LogQtInfo() (Hennadii Stepanov) b3d3ae0 qt, build: Drop `QT_STATICPLUGIN` macro (Hennadii Stepanov) Pull request description: Broken out of bitcoin#30454. Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's `QT_STATIC` macro. It is easy to see in the `_BITCOIN_QT_IS_STATIC` macro implementation: https://github.com/bitcoin/bitcoin/blob/ebd82fa9fae13d5a7a395800295dd7fd34185b58/build-aux/m4/bitcoin_qt.m4#L269-L292 No need to handle both macros. ACKs for top commit: maflcko: re-ACK 7231c76 TheCharlatan: ACK 7231c76 Tree-SHA512: abbf21859b7ac2aaf47c5b0e075403e4cc9bc540b1565d23f51650b8932dde314586aca67fd4ed5daadebc89268baf8c18f65348fa2b836078ac24543c14cfd6
2 parents 8e1bd17 + 7231c76 commit 357f195

File tree

5 files changed

+9
-20
lines changed

5 files changed

+9
-20
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
123123
fi
124124
fi
125125
126-
AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static])
127126
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
128127
AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])
129128
if test "$TARGET_OS" = "windows"; then

build_msvc/bitcoin_config.h.in

Lines changed: 0 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 14 deletions
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,29 +916,24 @@ 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+
LogInfo("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString());
927920
const auto static_plugins = QPluginLoader::staticPlugins();
928921
if (static_plugins.empty()) {
929-
LogPrintf("No static plugins.\n");
922+
LogInfo("No static plugins.\n");
930923
} else {
931-
LogPrintf("Static plugins:\n");
924+
LogInfo("Static plugins:\n");
932925
for (const QStaticPlugin& p : static_plugins) {
933926
QJsonObject meta_data = p.metaData();
934927
const std::string plugin_class = meta_data.take(QString("className")).toString().toStdString();
935928
const int plugin_version = meta_data.take(QString("version")).toInt();
936-
LogPrintf(" %s, version %d\n", plugin_class, plugin_version);
929+
LogInfo(" %s, version %d\n", plugin_class, plugin_version);
937930
}
938931
}
939932

940-
LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
941-
LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
933+
LogInfo("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
934+
LogInfo("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
942935
for (const QScreen* s : QGuiApplication::screens()) {
943-
LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
936+
LogInfo("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
944937
}
945938
}
946939

src/qt/test/test_main.cpp

Lines changed: 1 addition & 1 deletion
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)