logic: Rewrote license checking logic for trial and app merge

This commit is contained in:
Eberhard Graether
2016-10-08 13:42:40 +02:00
parent ee7bf4e9b7
commit 1b8736a6e1
26 changed files with 228 additions and 176 deletions
+18 -22
View File
@@ -9,7 +9,6 @@
#include <QTextEdit>
#include "licenses.h"
#include "isTrial.h"
QtAboutLicense::QtAboutLicense(QWidget *parent)
: QtWindow(parent)
@@ -30,30 +29,27 @@ void QtAboutLicense::populateWindow(QWidget* widget)
for (ThirdPartyLicense license : licenses3rdParties)
{
if( !(isTrial() && license.isNotInTrial) )
{
QLabel* licenseName = new QLabel();
licenseName->setText( QString::fromLatin1(license.name));
QFont _font = licenseName->font();
_font.setPixelSize(36);
_font.setBold(true);
licenseName->setFont(_font);
layout->addWidget(licenseName);
QLabel* licenseName = new QLabel();
licenseName->setText( QString::fromLatin1(license.name));
QFont _font = licenseName->font();
_font.setPixelSize(36);
_font.setBold(true);
licenseName->setFont(_font);
layout->addWidget(licenseName);
QLabel* licenseURL = new QLabel();
licenseURL->setText(QString::fromLatin1("(<a href=\"%1\">Website</a>)")
.arg(QString::fromLatin1(license.url)));
licenseURL->setOpenExternalLinks(true);
layout->addWidget(licenseURL);
QLabel* licenseURL = new QLabel();
licenseURL->setText(QString::fromLatin1("(<a href=\"%1\">Website</a>)")
.arg(QString::fromLatin1(license.url)));
licenseURL->setOpenExternalLinks(true);
layout->addWidget(licenseURL);
QLabel* licenseText = new QLabel();
licenseText->setFixedWidth(450);
licenseText->setWordWrap(true);
licenseText->setText(QString::fromLatin1(license.license));
layout->addWidget(licenseText);
QLabel* licenseText = new QLabel();
licenseText->setFixedWidth(450);
licenseText->setWordWrap(true);
licenseText->setText(QString::fromLatin1(license.license));
layout->addWidget(licenseText);
layout->addSpacing(50);
}
layout->addSpacing(50);
}
widget->setLayout(layout);