aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-03 16:12:19 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-11 14:22:50 +0200
commit96b733e99694e74dcd38b16112655f7e1ea2d43b (patch)
tree348d0303f312fd56ef39b413d3849ea6ae7ed122 /src/qt/bitcoin.cpp
parent9c8d2f6df0d748152d858cfea09e4463758c8df6 (diff)
downloadbitcoin-96b733e99694e74dcd38b16112655f7e1ea2d43b.tar.xz
Add `-version` option to get just the version
Adds a `-version` or `--version` option to print just the version of the program for bitcoind, bitcoin-cli and bitcoin-qt. Also make it that `-help` can be used to display the help (as well as existing `--help`). Up to now, `-help` was the only option that didn't work with either one or two dashes.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2be8191eb5..387f6ede4b 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -503,9 +503,9 @@ int main(int argc, char *argv[])
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
// but before showing splash screen.
- if (mapArgs.count("-?") || mapArgs.count("--help"))
+ if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
{
- HelpMessageDialog help(NULL);
+ HelpMessageDialog help(NULL, mapArgs.count("-version"));
help.showOrPrint();
return 1;
}