Skip to content

Commit 59f05d1

Browse files
committed
Merge #14521: qt, docs: Fix bitcoin-qt -version output formatting
60ae463 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
2 parents 0595164 + 60ae463 commit 59f05d1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/bitcoind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
8181

8282
if (gArgs.IsArgSet("-version"))
8383
{
84-
strUsage += FormatParagraph(LicenseInfo());
84+
strUsage += FormatParagraph(LicenseInfo()) + "\n";
8585
}
8686
else
8787
{

src/qt/utilitydialog.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <init.h>
2424
#include <interfaces/node.h>
2525
#include <util/system.h>
26+
#include <util/strencodings.h>
2627

2728
#include <stdio.h>
2829

@@ -54,9 +55,9 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo
5455
{
5556
setWindowTitle(tr("About %1").arg(tr(PACKAGE_NAME)));
5657

58+
std::string licenseInfo = LicenseInfo();
5759
/// HTML-format the license message from the core
58-
QString licenseInfo = QString::fromStdString(LicenseInfo());
59-
QString licenseInfoHTML = licenseInfo;
60+
QString licenseInfoHTML = QString::fromStdString(LicenseInfo());
6061
// Make URLs clickable
6162
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
6263
uri.setMinimal(true); // use non-greedy matching
@@ -66,7 +67,7 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo
6667

6768
ui->aboutMessage->setTextFormat(Qt::RichText);
6869
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
69-
text = version + "\n" + licenseInfo;
70+
text = version + "\n" + QString::fromStdString(FormatParagraph(licenseInfo));
7071
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML);
7172
ui->aboutMessage->setWordWrap(true);
7273
ui->helpMessage->setVisible(false);

0 commit comments

Comments
 (0)