diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-10-24 21:47:07 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-10-25 07:33:45 +0200 |
commit | 62e21fb5d00c33df37b6faaf0626da120c4783bc (patch) | |
tree | 27c5baae0240a5ff627119d5cbe98813a673f31b /src/qt/clientmodel.cpp | |
parent | 55913c997112c78d6058edfa210b6275cde853a6 (diff) |
Show warning when using prerelease version
Implements #1948
- Add macro `CLIENT_VERSION_IS_RELEASE` to clientversion.h
- When running a prerelease (the above macro is `false`):
- In UI, show an orange warning bar at the top. This will be used for other
warnings (and alerts) as well, instead of the status bar.
- For `bitcoind`, show the warning in the "errors" field in `getinfo`
response.
Diffstat (limited to 'src/qt/clientmodel.cpp')
-rw-r--r-- | src/qt/clientmodel.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 990b364a94..25db695a0b 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -88,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 @@ -133,6 +131,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); |