diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-05-06 18:27:47 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-05-06 18:27:47 +0200 |
commit | 3263b52e0c3f182c50c686e050747b2b10ab6dc6 (patch) | |
tree | 746b34f5f050a811ee6a99db47fd8583ed26fdcb /application/dialogs/AboutDialog.cpp | |
parent | 15c829fd3ce0de04db938566a56e66531c320580 (diff) | |
download | PrismLauncher-3263b52e0c3f182c50c686e050747b2b10ab6dc6.tar.gz PrismLauncher-3263b52e0c3f182c50c686e050747b2b10ab6dc6.tar.bz2 PrismLauncher-3263b52e0c3f182c50c686e050747b2b10ab6dc6.zip |
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.
Diffstat (limited to 'application/dialogs/AboutDialog.cpp')
-rw-r--r-- | application/dialogs/AboutDialog.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
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 <net/NetJob.h> +#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( "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN' 'http://www.w3.org/TR/REC-html40/strict.dtd'>" @@ -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)); |