diff options
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r-- | src/qt/clientmodel.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 43bce6f289..9b7362d757 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -4,6 +4,7 @@ #include "addresstablemodel.h" #include "transactiontablemodel.h" +#include "alert.h" #include "main.h" #include "ui_interface.h" @@ -87,9 +88,7 @@ void ClientModel::updateAlert(const QString &hash, int status) } } - // Emit a numBlocksChanged when the status message changes, - // so that the view recomputes and updates the status bar. - emit numBlocksChanged(getNumBlocks(), getNumBlocksOfPeers()); + emit alertsChanged(getStatusBarWarnings()); } bool ClientModel::isTestNet() const @@ -102,6 +101,15 @@ bool ClientModel::inInitialBlockDownload() const return IsInitialBlockDownload(); } +enum BlockSource ClientModel::getBlockSource() const +{ + if (fReindex) + return BLOCK_SOURCE_REINDEX; + if (fImporting) + return BLOCK_SOURCE_DISK; + return BLOCK_SOURCE_NETWORK; +} + int ClientModel::getNumBlocksOfPeers() const { return GetNumBlocksOfPeers(); @@ -127,6 +135,11 @@ QString ClientModel::formatBuildDate() const return QString::fromStdString(CLIENT_DATE); } +bool ClientModel::isReleaseVersion() const +{ + return CLIENT_VERSION_IS_RELEASE; +} + QString ClientModel::clientName() const { return QString::fromStdString(CLIENT_NAME); |