mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
qt: Add SynchronizationState enum to signal parameter
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include <uint256.h>
|
#include <uint256.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
#include <util/threadnames.h>
|
#include <util/threadnames.h>
|
||||||
|
#include <validation.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
|||||||
// Declare meta types used for QMetaObject::invokeMethod
|
// Declare meta types used for QMetaObject::invokeMethod
|
||||||
Q_DECLARE_METATYPE(bool*)
|
Q_DECLARE_METATYPE(bool*)
|
||||||
Q_DECLARE_METATYPE(CAmount)
|
Q_DECLARE_METATYPE(CAmount)
|
||||||
|
Q_DECLARE_METATYPE(SynchronizationState)
|
||||||
Q_DECLARE_METATYPE(uint256)
|
Q_DECLARE_METATYPE(uint256)
|
||||||
|
|
||||||
static QString GetLangTerritory()
|
static QString GetLangTerritory()
|
||||||
@@ -435,6 +437,7 @@ int GuiMain(int argc, char* argv[])
|
|||||||
|
|
||||||
// Register meta types used for QMetaObject::invokeMethod and Qt::QueuedConnection
|
// Register meta types used for QMetaObject::invokeMethod and Qt::QueuedConnection
|
||||||
qRegisterMetaType<bool*>();
|
qRegisterMetaType<bool*>();
|
||||||
|
qRegisterMetaType<SynchronizationState>();
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
qRegisterMetaType<WalletModel*>();
|
qRegisterMetaType<WalletModel*>();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -257,7 +257,8 @@ static void BlockTipChanged(ClientModel* clientmodel, SynchronizationState sync_
|
|||||||
Q_ARG(int, height),
|
Q_ARG(int, height),
|
||||||
Q_ARG(QDateTime, QDateTime::fromTime_t(blockTime)),
|
Q_ARG(QDateTime, QDateTime::fromTime_t(blockTime)),
|
||||||
Q_ARG(double, verificationProgress),
|
Q_ARG(double, verificationProgress),
|
||||||
Q_ARG(bool, fHeader));
|
Q_ARG(bool, fHeader),
|
||||||
|
Q_ARG(SynchronizationState, sync_state));
|
||||||
assert(invoked);
|
assert(invoked);
|
||||||
nLastUpdateNotification = now;
|
nLastUpdateNotification = now;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class BanTableModel;
|
class BanTableModel;
|
||||||
|
class CBlockIndex;
|
||||||
class OptionsModel;
|
class OptionsModel;
|
||||||
class PeerTableModel;
|
class PeerTableModel;
|
||||||
|
enum class SynchronizationState;
|
||||||
class CBlockIndex;
|
|
||||||
|
|
||||||
namespace interfaces {
|
namespace interfaces {
|
||||||
class Handler;
|
class Handler;
|
||||||
@@ -100,7 +100,7 @@ private:
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void numConnectionsChanged(int count);
|
void numConnectionsChanged(int count);
|
||||||
void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header);
|
void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state);
|
||||||
void mempoolSizeChanged(long count, size_t mempoolSizeInBytes);
|
void mempoolSizeChanged(long count, size_t mempoolSizeInBytes);
|
||||||
void networkActiveChanged(bool networkActive);
|
void networkActiveChanged(bool networkActive);
|
||||||
void alertsChanged(const QString &warnings);
|
void alertsChanged(const QString &warnings);
|
||||||
|
|||||||
Reference in New Issue
Block a user