ui: show EULA on first start of windows portable package
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
std::shared_ptr<Application> Application::s_instance;
|
std::shared_ptr<Application> Application::s_instance;
|
||||||
std::string Application::s_uuid;
|
std::string Application::s_uuid;
|
||||||
|
bool Application::EULA_ACCEPT_REQUIRED = true;
|
||||||
|
|
||||||
void Application::createInstance(
|
void Application::createInstance(
|
||||||
const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory
|
const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory
|
||||||
@@ -449,7 +450,7 @@ void Application::loadWindow(bool showStartWindow)
|
|||||||
|
|
||||||
updateTitle();
|
updateTitle();
|
||||||
|
|
||||||
bool showEula = (appSettings->getAcceptedEulaVersion() < EULA_VERSION);
|
bool showEula = (EULA_ACCEPT_REQUIRED && appSettings->getAcceptedEulaVersion() < EULA_VERSION);
|
||||||
bool enterLicense = (state != LicenseChecker::LicenseState::VALID);
|
bool enterLicense = (state != LicenseChecker::LicenseState::VALID);
|
||||||
|
|
||||||
m_mainView->loadWindow(showStartWindow, showEula, enterLicense, licenseError);
|
m_mainView->loadWindow(showStartWindow, showEula, enterLicense, licenseError);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Application
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const int EULA_VERSION = 5;
|
static const int EULA_VERSION = 5;
|
||||||
|
static bool EULA_ACCEPT_REQUIRED;
|
||||||
|
|
||||||
static void createInstance(const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory);
|
static void createInstance(const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory);
|
||||||
static std::shared_ptr<Application> getInstance();
|
static std::shared_ptr<Application> getInstance();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "FileSystem.h"
|
#include "FileSystem.h"
|
||||||
#include "AppPath.h"
|
#include "AppPath.h"
|
||||||
|
#include "Application.h"
|
||||||
#include "ResourcePaths.h"
|
#include "ResourcePaths.h"
|
||||||
#include "UserPaths.h"
|
#include "UserPaths.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
@@ -60,6 +61,8 @@ void setupApp(int argc, char *argv[])
|
|||||||
userDataPath.concatenate(L"Sourcetrail/");
|
userDataPath.concatenate(L"Sourcetrail/");
|
||||||
}
|
}
|
||||||
userDataPath.makeCanonical();
|
userDataPath.makeCanonical();
|
||||||
|
Application::EULA_ACCEPT_REQUIRED = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -335,12 +335,10 @@ void QtMainWindow::loadWindow(bool showStartWindow, bool showEULA, bool enterLic
|
|||||||
forceEnterLicense(licenseError);
|
forceEnterLicense(licenseError);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
if (showEULA)
|
if (showEULA)
|
||||||
{
|
{
|
||||||
showEula(true);
|
showEula(true);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtMainWindow::saveLayout()
|
void QtMainWindow::saveLayout()
|
||||||
|
|||||||
Reference in New Issue
Block a user