Skip to content

Commit d8ba3f7

Browse files
committed
Merge #359: Sync with the main repo
Pull request description: Sync with the main repo up to the latest bitcoin/bitcoin@ab42b2e, which includes the recent changes in the CI. There is no downloadable artifacts support for now. It will be done in a separated PR(s). Additionally: - The code was adjusted to reflect changes from [PR27419](bitcoin/bitcoin#27419), [PR27491](bitcoin/bitcoin#27491), [PR27576](bitcoin/bitcoin#27576) and [PR27636](bitcoin/bitcoin#27636). - Fixed `modernize-use-default-member-init` clang-tidy warnings. - The ARM task has been temporarily disabled until the issue with the depends cache is resolved. Guix builds: ``` e92b8c4c3298165edb1a0e85ee516d52c81af1269405dcbc6520e63069de2363 guix-build-b3261144c892/output/aarch64-linux-gnu/SHA256SUMS.part 939c6c002490d5649bdbfabacd20cd2270b41b20b7b3a254c9fcd5780209900d guix-build-b3261144c892/output/aarch64-linux-gnu/bitcoin-b3261144c892-aarch64-linux-gnu-debug.tar.gz b3c1383fb394997378997bdd2933965cf4ecc694143b4703108ff6ecb946696c guix-build-b3261144c892/output/aarch64-linux-gnu/bitcoin-b3261144c892-aarch64-linux-gnu.tar.gz f43fedf3af666d35e83b84e63cfe19f315f74f01296982f47d8c159385c3b03c guix-build-b3261144c892/output/arm-linux-gnueabihf/SHA256SUMS.part 73b89b0487e8eee474a6c9c96ae0e7ad635cccc332fc062eb5d4ff5555356c3e guix-build-b3261144c892/output/arm-linux-gnueabihf/bitcoin-b3261144c892-arm-linux-gnueabihf-debug.tar.gz b4518dd9396f316de8d7de5181b8b5d1083e0afa9081625c37117472d2559380 guix-build-b3261144c892/output/arm-linux-gnueabihf/bitcoin-b3261144c892-arm-linux-gnueabihf.tar.gz 0213e754408e2a032cef61a946354656f5b5f755f85aeac1ce4b37f1d22528e6 guix-build-b3261144c892/output/arm64-apple-darwin/SHA256SUMS.part 11bc1be1f53dad337565f3c556dd69abc2d702a31e661359daad6ff89225c794 guix-build-b3261144c892/output/arm64-apple-darwin/bitcoin-b3261144c892-arm64-apple-darwin-unsigned.dmg 558d8e805420c7a348759df6f559ca349953646aa28840efafe5a3d245ea917f guix-build-b3261144c892/output/arm64-apple-darwin/bitcoin-b3261144c892-arm64-apple-darwin-unsigned.tar.gz e679ce3f1c80aff11a5eab8890efbd0d396a851875fbd6f93f32eef5cdf06813 guix-build-b3261144c892/output/arm64-apple-darwin/bitcoin-b3261144c892-arm64-apple-darwin.tar.gz 0cb346390dc6620593b1af5b6669ddc3c1a8d2219a51b1697747c5ab24069c27 guix-build-b3261144c892/output/dist-archive/bitcoin-b3261144c892.tar.gz ac8bd2d58d9d0ebe2da1c8efa2d57bd97c3ef2b2590c758edbc4919808c528c5 guix-build-b3261144c892/output/powerpc64-linux-gnu/SHA256SUMS.part cdf8252fa8aca6da61ff6926de5c7e2e6560ab046049c84c26ba44823f83236a guix-build-b3261144c892/output/powerpc64-linux-gnu/bitcoin-b3261144c892-powerpc64-linux-gnu-debug.tar.gz 3b8b5f53d365b5bf962ecd7def9f06b6f13af0e5c9ef69c6d028f1ed772459be guix-build-b3261144c892/output/powerpc64-linux-gnu/bitcoin-b3261144c892-powerpc64-linux-gnu.tar.gz b44e688d233dcb46a7d6d0b1d97979335d3cc559d16190cc5cd647add79298d2 guix-build-b3261144c892/output/powerpc64le-linux-gnu/SHA256SUMS.part ae5c19afefd523cdc171a3f9aa9f707870fd99749c01c01166086619dfd95ece guix-build-b3261144c892/output/powerpc64le-linux-gnu/bitcoin-b3261144c892-powerpc64le-linux-gnu-debug.tar.gz bb581b1444fa1686f8889248af13d1859f2915091cd640bc522185d5ad83e13d guix-build-b3261144c892/output/powerpc64le-linux-gnu/bitcoin-b3261144c892-powerpc64le-linux-gnu.tar.gz bdca0a3c19b5a9a5c72b2b43b07050678d960009d3fa80cf7e0689d508346974 guix-build-b3261144c892/output/riscv64-linux-gnu/SHA256SUMS.part b0b9c91abe2ad0b5ab3b0bfd10c90133d8d75b50aef0a6a98ac2c2ae4219eaa8 guix-build-b3261144c892/output/riscv64-linux-gnu/bitcoin-b3261144c892-riscv64-linux-gnu-debug.tar.gz fcce0ea00f1d9df136dd677cbc468183faa92bd4bfcd4a77cd1c70f1b894b5f0 guix-build-b3261144c892/output/riscv64-linux-gnu/bitcoin-b3261144c892-riscv64-linux-gnu.tar.gz 7be84969950bb9570522be5a37551c01698cd3fb65eca3988fc9bd6867460552 guix-build-b3261144c892/output/x86_64-apple-darwin/SHA256SUMS.part 25203f50aa6a344ad1c6c4a44a48082440bb0af9bf38f0d60506569f216d1672 guix-build-b3261144c892/output/x86_64-apple-darwin/bitcoin-b3261144c892-x86_64-apple-darwin-unsigned.dmg 16c5baaf6d00ed43b0611c86c2d4555d500b3896daa1daac6a567bc2611c39f6 guix-build-b3261144c892/output/x86_64-apple-darwin/bitcoin-b3261144c892-x86_64-apple-darwin-unsigned.tar.gz 86662f39c29b013b576e6555ecb6cbbc98eaa08532a541e22a7ed6b1baf87209 guix-build-b3261144c892/output/x86_64-apple-darwin/bitcoin-b3261144c892-x86_64-apple-darwin.tar.gz fbbc0ad2376431fdc5b214fd63f24a6da907d87f6f11e0833def50c0d45772cd guix-build-b3261144c892/output/x86_64-linux-gnu/SHA256SUMS.part cba8d700f746a6063809570e45d6dc3d5e60ad5f1a28e0f41f8beed8b546a7b1 guix-build-b3261144c892/output/x86_64-linux-gnu/bitcoin-b3261144c892-x86_64-linux-gnu-debug.tar.gz 0a32985a1e26e13ce883a85e4a92cc68bf51ce096f2f6d74ea499a9fa662d7d0 guix-build-b3261144c892/output/x86_64-linux-gnu/bitcoin-b3261144c892-x86_64-linux-gnu.tar.gz 0bd4cc64cd6ad733cdef87cd74d5034e79dd250b72795cebf9c2c63500509457 guix-build-b3261144c892/output/x86_64-w64-mingw32/SHA256SUMS.part 6ed8f2e6c6cf1992d156672707cd2c254754051f88223dd052a9cd9078d84789 guix-build-b3261144c892/output/x86_64-w64-mingw32/bitcoin-b3261144c892-win64-debug.zip 1ea6d7660652e20b2b1529e406be1f606745d35f6a179b006335a19a19aa9a5b guix-build-b3261144c892/output/x86_64-w64-mingw32/bitcoin-b3261144c892-win64-setup-unsigned.exe 41b0f8cbac614e8c555921de60b25a73a75e6bed025de98ca40d3db48c5db6b1 guix-build-b3261144c892/output/x86_64-w64-mingw32/bitcoin-b3261144c892-win64-unsigned.tar.gz 5c68d711782e76f9e4be93b5468c505f022b72ca299532b200e58fe1e51343b1 guix-build-b3261144c892/output/x86_64-w64-mingw32/bitcoin-b3261144c892-win64.zip ``` Top commit has no ACKs. Tree-SHA512: dd18cfb2cfd6fd45b35bef8a0397bccc0752ce946b304bae986006ff09a9a183d6222b0f607e4dd3373992814ae0e61d5ba63cb54fef9a288152edef3d7ea81d
2 parents cccce66 + a929c52 commit d8ba3f7

File tree

10 files changed

+39
-57
lines changed

10 files changed

+39
-57
lines changed

qml/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44

55
This directory contains the source code for an experimental Bitcoin Core graphical user interface (GUI) built using the [Qt Quick](https://doc.qt.io/qt-5/qtquick-index.html) framework.
66

7-
Unsecure CI artifacts are available for local testing of the master branch, avoiding the need to build:
8-
- for Windows: [`unsecure_win_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip)
9-
- for Intel macOS: [`unsecure_mac_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip)
10-
- for Apple Silicon macOS: [`unsecure_mac_arm64_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/unsecure_mac_arm64_gui.zip)
11-
- for ARM64 Android: [`unsecure_android_apk.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip)
12-
- for ARM32 Android: [`unsecure_android_32bit_apk.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip)
7+
Insecure CI artifacts are available for local testing of the master branch, avoiding the need to build:
8+
- for Windows: [`insecure_win_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip)
9+
- for Intel macOS: [`insecure_mac_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip)
10+
- for Apple Silicon macOS: [`insecure_mac_arm64_gui.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip)
11+
- for ARM64 Android: [`insecure_android_apk.zip`](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip)
1312

1413
Note: For Apple Silicon macOS machines, the binary must be signed before it can
1514
be ran. To apply a signature, run the following on the unzipped CI artifact:
1615

1716
```
18-
codesign -s - ./Downloads/unsecure_mac_arm64_gui
17+
codesign -s - ./Downloads/insecure_mac_arm64_gui
1918
```
2019

2120
## Goals and Limitations

qml/bitcoin.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include <qml/bitcoin.h>
66

77
#include <chainparams.h>
8+
#include <common/args.h>
9+
#include <common/system.h>
810
#include <init.h>
911
#include <interfaces/chain.h>
1012
#include <interfaces/init.h>
@@ -30,7 +32,6 @@
3032
#include <qt/initexecutor.h>
3133
#include <qt/networkstyle.h>
3234
#include <qt/peertablemodel.h>
33-
#include <util/system.h>
3435
#include <util/threadnames.h>
3536
#include <util/translation.h>
3637

@@ -145,7 +146,7 @@ void setupChainQSettings(QGuiApplication* app, QString chain)
145146
int QmlGuiMain(int argc, char* argv[])
146147
{
147148
#ifdef WIN32
148-
util::WinCmdLineArgs winArgs;
149+
common::WinCmdLineArgs winArgs;
149150
std::tie(argc, argv) = winArgs.get();
150151
#endif // WIN32
151152

@@ -192,7 +193,7 @@ int QmlGuiMain(int argc, char* argv[])
192193

193194
/// Check for chain settings (Params() calls are only valid after this clause).
194195
try {
195-
SelectParams(gArgs.GetChainName());
196+
SelectParams(gArgs.GetChainType());
196197
} catch(std::exception &e) {
197198
InitError(Untranslated(strprintf("%s\n", e.what())));
198199
return EXIT_FAILURE;
@@ -248,7 +249,7 @@ int QmlGuiMain(int argc, char* argv[])
248249
#endif
249250

250251
ChainModel chain_model{*chain};
251-
chain_model.setCurrentNetworkName(QString::fromStdString(gArgs.GetChainName()));
252+
chain_model.setCurrentNetworkName(QString::fromStdString(ChainTypeToString(gArgs.GetChainType())));
252253
setupChainQSettings(&app, chain_model.currentNetworkName());
253254

254255
QObject::connect(&node_model, &NodeModel::setTimeRatioList, &chain_model, &ChainModel::setTimeRatioList);
@@ -268,7 +269,7 @@ int QmlGuiMain(int argc, char* argv[])
268269

269270
QQmlApplicationEngine engine;
270271

271-
QScopedPointer<const NetworkStyle> network_style{NetworkStyle::instantiate(Params().NetworkIDString())};
272+
QScopedPointer<const NetworkStyle> network_style{NetworkStyle::instantiate(Params().GetChainType())};
272273
assert(!network_style.isNull());
273274
engine.addImageProvider(QStringLiteral("images"), new ImageProvider{network_style.data()});
274275

qml/components/blockclockdial.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@
1313
#include <QtGlobal>
1414

1515
BlockClockDial::BlockClockDial(QQuickItem *parent)
16-
: QQuickPaintedItem(parent)
17-
, m_time_ratio_list{0.0}
18-
, m_pen_width{4}
19-
, m_scale{5/12}
20-
, m_background_color{QColor("#2D2D2D")}
21-
, m_confirmation_colors{QList<QColor>{}}
22-
, m_time_tick_color{QColor("#000000")}
23-
, m_animation_timer{QTimer(this)}
16+
: QQuickPaintedItem(parent)
2417
{
2518
m_animation_timer.setTimerType(Qt::PreciseTimer);
2619
m_animation_timer.setInterval(16);

qml/components/blockclockdial.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ public Q_SLOTS:
6868
qreal incrementAnimatingMaxAngle(qreal angle);
6969
qreal getTargetAnimationAngle();
7070

71-
QVariantList m_time_ratio_list;
71+
QVariantList m_time_ratio_list{0.0};
7272
double m_verification_progress;
7373
bool m_is_connected;
7474
bool m_is_synced;
7575
bool m_is_paused;
76-
qreal m_pen_width;
77-
qreal m_scale;
78-
QColor m_background_color;
76+
qreal m_pen_width{4};
77+
qreal m_scale{5/12};
78+
QColor m_background_color{"#2D2D2D"};
7979
QConicalGradient m_connecting_gradient;
8080
qreal m_connecting_start_angle = 90;
8181
const qreal m_connecting_end_angle = -180;
82-
QList<QColor> m_confirmation_colors;
83-
QColor m_time_tick_color;
84-
QTimer m_animation_timer;
82+
QList<QColor> m_confirmation_colors{};
83+
QColor m_time_tick_color{"#000000"};
84+
QTimer m_animation_timer{this};
8585
QTimer m_delay_timer;
8686
qreal m_animating_max_angle = 0;
8787
};

qml/controls/linegraph.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616

1717
LineGraph::LineGraph(QQuickItem *parent)
1818
: QQuickPaintedItem(parent)
19-
, m_background_color{QColor("#2D2D2D")}
20-
, m_border_color{QColor("#000000")}
21-
, m_fill_color{QColor("#000000")}
22-
, m_fill_gradient{QLinearGradient(0, 0, 0, 0)}
23-
, m_line_color{QColor("#000000")}
24-
, m_marker_line_color{("#000000")}
25-
, m_max_samples{0}
26-
, m_max_value{0}
2719
{
2820
setFillColor(m_background_color);
2921
}

qml/controls/linegraph.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ class LineGraph : public QQuickPaintedItem
5353
void paintTraffic(QPainter * painter);
5454
void setupGradient(QPainterPath * painter);
5555

56-
QColor m_background_color;
57-
QColor m_border_color;
58-
QColor m_fill_color;
59-
QLinearGradient m_fill_gradient;
60-
QColor m_line_color;
61-
QColor m_marker_line_color;
62-
int m_max_samples;
63-
float m_max_value;
56+
QColor m_background_color{"#2D2D2D"};
57+
QColor m_border_color{"#000000"};
58+
QColor m_fill_color{"#000000"};
59+
QLinearGradient m_fill_gradient{0, 0, 0, 0};
60+
QColor m_line_color{"#000000"};
61+
QColor m_marker_line_color{"#000000"};
62+
int m_max_samples{0};
63+
float m_max_value{0};
6464
QQueue<float> m_value_list;
6565
};
6666

qml/models/networktraffictower.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
NetworkTrafficTower::NetworkTrafficTower(NodeModel& node)
1414
: m_node{node}
15-
, m_total_bytes_received{0.0f}
16-
, m_total_bytes_sent{0.0f}
17-
, m_max_received_rate_bps{0.0f}
18-
, m_max_sent_rate_bps{0.0f}
1915
{
2016
QTimer* timer = new QTimer();
2117
connect(timer, &QTimer::timeout, this, &NetworkTrafficTower::updateTrafficStats);

qml/models/networktraffictower.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public Q_SLOTS:
5454

5555
NodeModel& m_node;
5656
int m_filter_window_size;
57-
float m_total_bytes_received;
58-
float m_total_bytes_sent;
59-
float m_max_received_rate_bps;
60-
float m_max_sent_rate_bps;
57+
float m_total_bytes_received{0.0f};
58+
float m_total_bytes_sent{0.0f};
59+
float m_max_received_rate_bps{0.0f};
60+
float m_max_sent_rate_bps{0.0f};
6161
QQueue<float> m_received_rate_list;
6262
QQueue<float> m_smoothed_received_rate_list;
6363
QQueue<float> m_sent_rate_list;

qml/models/options_model.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
#include <qml/models/options_model.h>
66

7+
#include <common/args.h>
8+
#include <common/settings.h>
9+
#include <common/system.h>
710
#include <interfaces/node.h>
811
#include <qt/guiconstants.h>
912
#include <qt/optionsmodel.h>
1013
#include <txdb.h>
1114
#include <univalue.h>
12-
#include <util/settings.h>
13-
#include <util/system.h>
1415
#include <validation.h>
1516

1617
#include <cassert>
@@ -99,7 +100,7 @@ void OptionsQmlModel::setUpnp(bool new_upnp)
99100
}
100101
}
101102

102-
util::SettingsValue OptionsQmlModel::pruneSetting() const
103+
common::SettingsValue OptionsQmlModel::pruneSetting() const
103104
{
104105
assert(!m_prune || m_prune_size_gb >= 1);
105106
return m_prune ? PruneGBtoMiB(m_prune_size_gb) : 0;

qml/models/options_model.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#define BITCOIN_QML_MODELS_OPTIONS_MODEL_H
77

88
#include <txdb.h>
9-
#include <util/settings.h>
10-
#include <util/system.h>
9+
#include <common/settings.h>
10+
#include <common/system.h>
1111
#include <validation.h>
1212

1313
#include <QObject>
@@ -84,7 +84,7 @@ class OptionsQmlModel : public QObject
8484
bool m_server;
8585
bool m_upnp;
8686

87-
util::SettingsValue pruneSetting() const;
87+
common::SettingsValue pruneSetting() const;
8888
};
8989

9090
#endif // BITCOIN_QML_MODELS_OPTIONS_MODEL_H

0 commit comments

Comments
 (0)