ui: show EULA on first start of windows portable package

This commit is contained in:
mlangkabel
2019-05-13 18:02:41 +02:00
parent 67e342119a
commit a9887da9f1
4 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -34,6 +34,7 @@
std::shared_ptr<Application> Application::s_instance;
std::string Application::s_uuid;
bool Application::EULA_ACCEPT_REQUIRED = true;
void Application::createInstance(
const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory
@@ -449,7 +450,7 @@ void Application::loadWindow(bool showStartWindow)
updateTitle();
bool showEula = (appSettings->getAcceptedEulaVersion() < EULA_VERSION);
bool showEula = (EULA_ACCEPT_REQUIRED && appSettings->getAcceptedEulaVersion() < EULA_VERSION);
bool enterLicense = (state != LicenseChecker::LicenseState::VALID);
m_mainView->loadWindow(showStartWindow, showEula, enterLicense, licenseError);
+1
View File
@@ -35,6 +35,7 @@ class Application
{
public:
static const int EULA_VERSION = 5;
static bool EULA_ACCEPT_REQUIRED;
static void createInstance(const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory);
static std::shared_ptr<Application> getInstance();
@@ -9,6 +9,7 @@
#include "FileSystem.h"
#include "AppPath.h"
#include "Application.h"
#include "ResourcePaths.h"
#include "UserPaths.h"
#include "utility.h"
@@ -60,6 +61,8 @@ void setupApp(int argc, char *argv[])
userDataPath.concatenate(L"Sourcetrail/");
}
userDataPath.makeCanonical();
Application::EULA_ACCEPT_REQUIRED = false;
}
else
{
-2
View File
@@ -335,12 +335,10 @@ void QtMainWindow::loadWindow(bool showStartWindow, bool showEULA, bool enterLic
forceEnterLicense(licenseError);
}
#ifndef Q_OS_WIN
if (showEULA)
{
showEula(true);
}
#endif
}
void QtMainWindow::saveLayout()