Skip to content

Commit 60ae463

Browse files
committed
Fix bitcoin-qt -version output formatting
1 parent 13d98ea commit 60ae463

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
@@ -77,7 +77,7 @@ static bool AppInit(int argc, char* argv[])
7777

7878
if (gArgs.IsArgSet("-version"))
7979
{
80-
strUsage += FormatParagraph(LicenseInfo());
80+
strUsage += FormatParagraph(LicenseInfo()) + "\n";
8181
}
8282
else
8383
{

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)