aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-11-23 10:16:07 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-11-23 10:17:46 +0100
commit59f05d1161698dcca6eaf719422d4ec3401f2954 (patch)
treee19cb5d4cbff0eba5d92650e2f6793cb326a31c4 /src
parent0595164dbaa355dc7c4e485a8d7eaebac36069e5 (diff)
parent60ae463a68206b08faaadfbb023d7ede78fff784 (diff)
Merge #14521: qt, docs: Fix `bitcoin-qt -version` output formatting
60ae463a68206b08faaadfbb023d7ede78fff784 Fix `bitcoin-qt -version` output formatting (Hennadii Stepanov) Pull request description: This PR makes command line output of `bitcoin-qt -version` formatted in the same way as `bitcoind -version` output. Before: ![screenshot from 2018-10-19 20-16-42](https://user-images.githubusercontent.com/32963518/47233718-434a2a80-d3dc-11e8-90d4-84dd23e8ac3b.png) After: ![screenshot from 2018-10-19 20-22-09](https://user-images.githubusercontent.com/32963518/47233888-b653a100-d3dc-11e8-9155-000b517a8e7b.png) Tree-SHA512: fd8bd20e2108b9562bcbf6c094f950e867a5755994e8acc28b07e52fe73d04f783201c20bde47be2083ce89fb3ef9749f9c3757d479ad6c48ed09c633155f47e
Diffstat (limited to 'src')
-rw-r--r--src/bitcoind.cpp2
-rw-r--r--src/qt/utilitydialog.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 1306ba3821..dde75c1b12 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
if (gArgs.IsArgSet("-version"))
{
- strUsage += FormatParagraph(LicenseInfo());
+ strUsage += FormatParagraph(LicenseInfo()) + "\n";
}
else
{
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index ebf7bad795..b051dd159b 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -23,6 +23,7 @@
#include <init.h>
#include <interfaces/node.h>
#include <util/system.h>
+#include <util/strencodings.h>
#include <stdio.h>
@@ -54,9 +55,9 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo
{
setWindowTitle(tr("About %1").arg(tr(PACKAGE_NAME)));
+ std::string licenseInfo = LicenseInfo();
/// HTML-format the license message from the core
- QString licenseInfo = QString::fromStdString(LicenseInfo());
- QString licenseInfoHTML = licenseInfo;
+ QString licenseInfoHTML = QString::fromStdString(LicenseInfo());
// Make URLs clickable
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
uri.setMinimal(true); // use non-greedy matching
@@ -66,7 +67,7 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo
ui->aboutMessage->setTextFormat(Qt::RichText);
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- text = version + "\n" + licenseInfo;
+ text = version + "\n" + QString::fromStdString(FormatParagraph(licenseInfo));
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML);
ui->aboutMessage->setWordWrap(true);
ui->helpMessage->setVisible(false);