diff options
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)); |