From 3263b52e0c3f182c50c686e050747b2b10ab6dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 6 May 2017 18:27:47 +0200 Subject: GH-1876 replace ColumnResizer with a newer, BSD-3 licensed version Also, keep licensing info only in one file. The COPYING.md is now a resource and rendered to HTML in the About dialog. --- application/dialogs/AboutDialog.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'application/dialogs/AboutDialog.cpp') diff --git a/application/dialogs/AboutDialog.cpp b/application/dialogs/AboutDialog.cpp index 205c1a1f..3d16f5c3 100644 --- a/application/dialogs/AboutDialog.cpp +++ b/application/dialogs/AboutDialog.cpp @@ -21,9 +21,11 @@ #include +#include "HoeDown.h" + // Credits // This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument... -QString getCreditsHtml(QStringList patrons) +static QString getCreditsHtml(QStringList patrons) { QString creditsHtml = QObject::tr( "" @@ -70,6 +72,15 @@ QString getCreditsHtml(QStringList patrons) } } +static QString getLicenseHtml() +{ + HoeDown hoedown; + QFile dataFile(":/documents/COPYING.md"); + dataFile.open(QIODevice::ReadOnly); + QString output = hoedown.process(dataFile.readAll()); + return output; +} + AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); @@ -77,6 +88,9 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia QString chtml = getCreditsHtml(QStringList()); ui->creditsText->setHtml(chtml); + QString lhtml = getLicenseHtml(); + ui->licenseText->setHtml(lhtml); + ui->urlLabel->setOpenExternalLinks(true); ui->icon->setPixmap(MMC->getThemedIcon("multimc").pixmap(64)); -- cgit v1.2.3