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:
  ![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
This commit is contained in:
Wladimir J. van der Laan 2018-11-23 10:16:07 +01:00
commit 59f05d1161
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
2 changed files with 5 additions and 4 deletions

View file

@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
if (gArgs.IsArgSet("-version"))
{
strUsage += FormatParagraph(LicenseInfo());
strUsage += FormatParagraph(LicenseInfo()) + "\n";
}
else
{

View file

@ -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);