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
+2 -8
View File
@@ -15,6 +15,7 @@
#include "component/view/MainView.h"
#include "component/view/ViewFactory.h"
#include "data/StorageCache.h"
#include "LicenseChecker.h"
#include "settings/ApplicationSettings.h"
#include "settings/ColorScheme.h"
@@ -73,6 +74,7 @@ void Application::loadSettings()
Application::Application(bool withGUI)
: m_hasGUI(withGUI)
{
LicenseChecker::createInstance();
}
Application::~Application()
@@ -135,14 +137,6 @@ void Application::saveProject(const FilePath& projectSettingsFilePath)
}
}
void Application::forceEnterLicense()
{
if (m_hasGUI)
{
m_mainView->forceLicenseScreen();
}
}
void Application::handleMessage(MessageActivateWindow* message)
{
if (m_hasGUI)