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
-6
View File
@@ -18,8 +18,6 @@
#include "qt/window/QtMainWindow.h"
#include "version.h"
#include "settings/ProjectSettings.h"
void init()
{
std::shared_ptr<ConsoleLogger> consoleLogger = std::make_shared<ConsoleLogger>();
@@ -59,7 +57,6 @@ int main(int argc, char *argv[])
std::shared_ptr<Application> app = Application::create(version);
std::shared_ptr<LicenseChecker> checker = LicenseChecker::getInstance();
checker->setApp(app.get());
if (commandLineParser.startedWithLicense())
{
@@ -93,9 +90,6 @@ int main(int argc, char *argv[])
utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), ".otf");
std::shared_ptr<Application> app = Application::create(version, &viewFactory, &networkFactory);
std::shared_ptr<LicenseChecker> checker = LicenseChecker::getInstance();
checker->setApp(app.get());
commandLineParser.projectLoad();
return qtApp.exec();