mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
Merge #14521: qt, docs: Fix bitcoin-qt -version output formatting
60ae463a68 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:

After:

Tree-SHA512: fd8bd20e2108b9562bcbf6c094f950e867a5755994e8acc28b07e52fe73d04f783201c20bde47be2083ce89fb3ef9749f9c3757d479ad6c48ed09c633155f47e
This commit is contained in:
@@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
|
||||
|
||||
if (gArgs.IsArgSet("-version"))
|
||||
{
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
strUsage += FormatParagraph(LicenseInfo()) + "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user