Skip to content

Commit 6be715b

Browse files
committed
qml: Add GUIUtil::LogQtInfo() call
1 parent 2aa44e6 commit 6be715b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/qml/bitcoin.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <noui.h>
1212
#include <qml/nodemodel.h>
1313
#include <qt/guiconstants.h>
14+
#include <qt/guiutil.h>
1415
#include <qt/initexecutor.h>
1516
#include <util/system.h>
1617
#include <util/translation.h>
@@ -113,6 +114,8 @@ int QmlGuiMain(int argc, char* argv[])
113114
InitLogging(gArgs);
114115
InitParameterInteraction(gArgs);
115116

117+
GUIUtil::LogQtInfo();
118+
116119
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(&node_context);
117120
if (!node->baseInitialize()) {
118121
// A dialog with detailed error will have been shown by InitError().

src/qt/guiutil.cpp

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

5+
#ifdef HAVE_CONFIG_H
6+
#include <config/bitcoin-config.h>
7+
#endif
8+
59
#include <qt/guiutil.h>
610

711
#include <qt/bitcoinaddressvalidator.h>
@@ -61,6 +65,9 @@
6165
#include <QThread>
6266
#include <QUrlQuery>
6367
#include <QtGlobal>
68+
#if USE_QML
69+
#include <QQuickStyle>
70+
#endif // USE_QML
6471

6572
#include <cassert>
6673
#include <chrono>
@@ -881,7 +888,7 @@ void LogQtInfo()
881888
#else
882889
const std::string plugin_link{"dynamic"};
883890
#endif
884-
LogPrintf("Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString(), plugin_link);
891+
LogPrintf("Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, qGuiApp->platformName().toStdString(), plugin_link);
885892
const auto static_plugins = QPluginLoader::staticPlugins();
886893
if (static_plugins.empty()) {
887894
LogPrintf("No static plugins.\n");
@@ -895,7 +902,12 @@ void LogQtInfo()
895902
}
896903
}
897904

905+
#if USE_QML
906+
LogPrintf("QQuickStyle: %s\n", QQuickStyle::name().toStdString());
907+
#else
898908
LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
909+
#endif // USE_QML
910+
899911
LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
900912
for (const QScreen* s : QGuiApplication::screens()) {
901913
LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());

0 commit comments

Comments
 (0)