license: Implemented new license format

* Implemented new format splitting user, version, and usage period into separate lines
* Refactored all classes: License, LicenseGenerator, LicenseChecker
* Removed redundant license check hash from ApplicationSettings, don't generate, store and check it anymore
* Moved license checking and encoding logic to LicenseChecker
* Moved default for license generation to main.cpp
* Refactored license checking logic in whole app, removed involved message types
* Added LicenseCheckerTestSuite for checking all legacy and current license types
* Generate new license type lifelong
This commit is contained in:
Eberhard Graether
2019-03-18 14:49:52 +01:00
parent 6ff7d22641
commit b02064a160
38 changed files with 2073 additions and 1538 deletions
+2 -3
View File
@@ -15,7 +15,6 @@
#include "QtCoreApplication.h"
#include "utilityQt.h"
#include "QtViewFactory.h"
#include "QtEulaWindow.h"
#include "ApplicationSettings.h"
#include "CommandLineParser.h"
#include "ConsoleLogger.h"
@@ -258,7 +257,7 @@ int main(int argc, char *argv[])
// check if already agreed to EULA
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
if (appSettings->getAcceptedEulaVersion() < QtEulaWindow::EULA_VERSION)
if (appSettings->getAcceptedEulaVersion() < Application::EULA_VERSION)
{
if (!commandLineParser.acceptedEULA())
{
@@ -282,7 +281,7 @@ int main(int argc, char *argv[])
}
std::cout << "\nSourcetrail End User License Agreement accepted.\n" << std::endl;
appSettings->setAcceptedEulaVersion(QtEulaWindow::EULA_VERSION);
appSettings->setAcceptedEulaVersion(Application::EULA_VERSION);
appSettings->save();
}