fixup! Merge bitcoin/bitcoin#30567: qt, build: Drop QT_STATICPLUGIN macro

continue using logprintf
This commit is contained in:
pasta 2024-10-03 10:45:54 -05:00
parent 142245d29a
commit 2f751ed127
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38

View File

@ -1862,24 +1862,25 @@ void LogQtInfo()
#else
const std::string qt_link{"dynamic"};
#endif
LogInfo("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString());
// TODO replace instances of LogPrintf with LogInfo once 28318 is merged
LogPrintf("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString());
const auto static_plugins = QPluginLoader::staticPlugins();
if (static_plugins.empty()) {
LogInfo("No static plugins.\n");
LogPrintf("No static plugins.\n");
} else {
LogInfo("Static plugins:\n");
LogPrintf("Static plugins:\n");
for (const QStaticPlugin& p : static_plugins) {
QJsonObject meta_data = p.metaData();
const std::string plugin_class = meta_data.take(QString("className")).toString().toStdString();
const int plugin_version = meta_data.take(QString("version")).toInt();
LogInfo(" %s, version %d\n", plugin_class, plugin_version);
LogPrintf(" %s, version %d\n", plugin_class, plugin_version);
}
}
LogInfo("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
LogInfo("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
for (const QScreen* s : QGuiApplication::screens()) {
LogInfo("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
}
}