logic: Show error message when license expired

* moved all license checking logic to LicenseChecker
* create LicenseChecker instance in app
* Notify MainView with MessageForceEnterLicense
This commit is contained in:
Eberhard Graether
2016-04-22 13:58:13 +02:00
parent 73973cb4a3
commit a6e57a6564
15 changed files with 221 additions and 140 deletions
+10 -2
View File
@@ -262,7 +262,7 @@ void QtMainWindow::saveLayout()
settings.setValue("DOCK_LOCATIONS", this->saveState());
}
void QtMainWindow::forceEnterLicense()
void QtMainWindow::forceEnterLicense(bool expired)
{
enterLicense();
@@ -272,7 +272,15 @@ void QtMainWindow::forceEnterLicense()
LOG_ERROR("No enter license window on top of stack");
return;
}
enterLicenseWindow->clear();
if (expired)
{
enterLicenseWindow->setErrorMessage("The license key is expired.");
}
else
{
enterLicenseWindow->clear();
}
this->setEnabled(false);
enterLicenseWindow->setEnabled(true);