Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GUIUtil::LogQtInfo() call #24

Merged
merged 1 commit into from
Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/qml/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <noui.h>
#include <qml/nodemodel.h>
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
#include <qt/initexecutor.h>
#include <util/system.h>
#include <util/translation.h>
Expand Down Expand Up @@ -113,6 +114,8 @@ int QmlGuiMain(int argc, char* argv[])
InitLogging(gArgs);
InitParameterInteraction(gArgs);

GUIUtil::LogQtInfo();

std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(&node_context);
if (!node->baseInitialize()) {
// A dialog with detailed error will have been shown by InitError().
Expand Down
14 changes: 13 additions & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifdef HAVE_CONFIG_H
#include <config/bitcoin-config.h>
#endif

#include <qt/guiutil.h>

#include <qt/bitcoinaddressvalidator.h>
Expand Down Expand Up @@ -61,6 +65,9 @@
#include <QThread>
#include <QUrlQuery>
#include <QtGlobal>
#if USE_QML
#include <QQuickStyle>
#endif // USE_QML

#include <cassert>
#include <chrono>
Expand Down Expand Up @@ -881,7 +888,7 @@ void LogQtInfo()
#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 (%s)\n", qVersion(), qt_link, qGuiApp->platformName().toStdString(), plugin_link);
const auto static_plugins = QPluginLoader::staticPlugins();
if (static_plugins.empty()) {
LogPrintf("No static plugins.\n");
Expand All @@ -895,7 +902,12 @@ void LogQtInfo()
}
}

#if USE_QML
LogPrintf("QQuickStyle: %s\n", QQuickStyle::name().toStdString());
#else
LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
#endif // USE_QML

LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
for (const QScreen* s : QGuiApplication::screens()) {
LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
Expand Down