Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt, docs: Fix bitcoin-qt -version output formatting #14521

Merged
merged 1 commit into from Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bitcoind.cpp
Expand Up @@ -77,7 +77,7 @@ static bool AppInit(int argc, char* argv[])

if (gArgs.IsArgSet("-version"))
{
strUsage += FormatParagraph(LicenseInfo());
strUsage += FormatParagraph(LicenseInfo()) + "\n";
}
else
{
Expand Down
7 changes: 4 additions & 3 deletions src/qt/utilitydialog.cpp
Expand Up @@ -23,6 +23,7 @@
#include <init.h>
#include <interfaces/node.h>
#include <util/system.h>
#include <util/strencodings.h>

#include <stdio.h>

Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down