diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-05-20 12:05:24 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-05-20 12:08:22 +0200 |
commit | 8c61374ba782bfd328741fb7a46f32581e524ef6 (patch) | |
tree | 3d86f39c5941f9aaa3dc04c5f3380543d2533233 /src/qt/clientmodel.h | |
parent | 8118970c869fe21392ffcf58cf4afd85ec4f29e0 (diff) | |
parent | bcbf982553aba8107fdb0db413d4b9fe8adc8f17 (diff) |
Merge bitcoin-core/gui#581: refactor: Revamp `ClientModel` code to handle core signals
bcbf982553aba8107fdb0db413d4b9fe8adc8f17 qt, doc: Remove unneeded comments (Hennadii Stepanov)
9bd1565f6501c81291b286cdfaecd0daf8981c75 qt: Revamp ClientModel code to handle {Block|Header}Tip core signals (Hennadii Stepanov)
48f6d39659e40f44907a7c09f839df988e6c6206 qt: Revamp ClientModel code to handle BannedListChanged core signal (Hennadii Stepanov)
36b12af7eeb571efccd972b2f732a81ae7310066 qt: Revamp ClientModel code to handle AlertChanged core signal (Hennadii Stepanov)
bfe5140c50d16cc995c7da458d38759b68e9cbe6 qt: Revamp ClientModel code to handle NetworkActiveChanged core signal (Hennadii Stepanov)
639563d7fea6b4d65840625dc466eede32d893cf qt: Revamp ClientModel code to handle NumConnectionsChanged core signal (Hennadii Stepanov)
508e2dca5e91c1ff921f01d260fc62f629f1dc9e qt: Revamp ClientModel code to handle ShowProgress core signal (Hennadii Stepanov)
Pull request description:
This PR:
- is a pure refactoring with no behavior change
- gets rid of `QMetaObject::invokeMethod()` "dynamic" calls, i.e., without compile-time checks of a called function name and its parameters
- replaces `std::bind`s with lambdas, making parameter permutation (including parameter omitting) explicit
- makes code simpler, more concise, and easier to reason about
Additionally, debug messages have been unified.
ACKs for top commit:
promag:
Code review ACK bcbf982553aba8107fdb0db413d4b9fe8adc8f17
w0xlt:
tACK https://github.com/bitcoin-core/gui/pull/581/commits/bcbf982553aba8107fdb0db413d4b9fe8adc8f17 on Ubuntu 21.10, Qt 5.15.2.
Tree-SHA512: 35f62b84f916b3ad7442f0fea945d344b3c448878b33506ac7b81fdf5e49bd2a82e12a6927dc91f62c335487bf2305cc45e2f08985303eef31c3ed2dd39e1037
Diffstat (limited to 'src/qt/clientmodel.h')
-rw-r--r-- | src/qt/clientmodel.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 1c8116738d..b10ffb4523 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -23,6 +23,7 @@ enum class SynchronizationState; namespace interfaces { class Handler; class Node; +struct BlockTip; } QT_BEGIN_NAMESPACE @@ -104,6 +105,7 @@ private: //! A thread to interact with m_node asynchronously QThread* const m_thread; + void TipChanged(SynchronizationState sync_state, interfaces::BlockTip tip, double verification_progress, bool header); void subscribeToCoreSignals(); void unsubscribeFromCoreSignals(); @@ -120,12 +122,6 @@ Q_SIGNALS: // Show progress dialog e.g. for verifychain void showProgress(const QString &title, int nProgress); - -public Q_SLOTS: - void updateNumConnections(int numConnections); - void updateNetworkActive(bool networkActive); - void updateAlert(); - void updateBanlist(); }; #endif // BITCOIN_QT_CLIENTMODEL_H |