ui: Remove EULA from GUI and Windows installer
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "CommandlineHelper.h"
|
||||
#include "CommandlineCommandAcceptEULA.h"
|
||||
#include "CommandlineCommandConfig.h"
|
||||
#include "CommandlineCommandIndex.h"
|
||||
#include "ConfigManager.h"
|
||||
@@ -42,7 +41,6 @@ void CommandLineParser::setup()
|
||||
|
||||
addCommand(std::make_unique<commandline::CommandlineCommandConfig>(this));
|
||||
addCommand(std::make_unique<commandline::CommandlineCommandIndex>(this));
|
||||
addCommand(std::make_unique<commandline::CommandlineCommandAcceptEULA>(this));
|
||||
|
||||
for (auto& command : m_commands)
|
||||
{
|
||||
@@ -76,7 +74,6 @@ void CommandLineParser::preparse(std::vector<std::string>& args)
|
||||
{
|
||||
if ( m_args[0] == command->name())
|
||||
{
|
||||
command->preparse();
|
||||
m_withoutGUI = true;
|
||||
return;
|
||||
}
|
||||
@@ -193,11 +190,6 @@ bool CommandLineParser::exitApplication() const
|
||||
return m_quit;
|
||||
}
|
||||
|
||||
bool CommandLineParser::acceptedEULA() const
|
||||
{
|
||||
return m_acceptEULA;
|
||||
}
|
||||
|
||||
bool CommandLineParser::hasError() const
|
||||
{
|
||||
return !m_errorString.empty();
|
||||
@@ -247,11 +239,6 @@ void CommandLineParser::incompleteRefresh()
|
||||
m_refreshMode = REFRESH_UPDATED_AND_INCOMPLETE_FILES;
|
||||
}
|
||||
|
||||
void CommandLineParser::acceptEULA()
|
||||
{
|
||||
m_acceptEULA = true;
|
||||
}
|
||||
|
||||
const FilePath& CommandLineParser::getProjectFilePath() const
|
||||
{
|
||||
return m_projectFile;
|
||||
|
||||
@@ -30,12 +30,10 @@ public:
|
||||
|
||||
bool runWithoutGUI() const;
|
||||
bool exitApplication() const;
|
||||
bool acceptedEULA() const;
|
||||
|
||||
bool hasError() const;
|
||||
std::wstring getError();
|
||||
|
||||
void acceptEULA();
|
||||
void fullRefresh();
|
||||
void incompleteRefresh();
|
||||
|
||||
@@ -61,7 +59,6 @@ private:
|
||||
|
||||
bool m_quit = false;
|
||||
bool m_withoutGUI = false;
|
||||
bool m_acceptEULA = false;
|
||||
|
||||
std::wstring m_errorString;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,6 @@ public:
|
||||
const std::string& description();
|
||||
|
||||
virtual void setup() = 0;
|
||||
virtual void preparse() = 0;
|
||||
virtual ReturnStatus parse(std::vector<std::string>& args) = 0;
|
||||
|
||||
virtual bool hasHelp() const = 0;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#include "CommandlineCommandAcceptEULA.h"
|
||||
|
||||
#include "CommandlineHelper.h"
|
||||
#include "CommandLineParser.h"
|
||||
|
||||
namespace commandline
|
||||
{
|
||||
|
||||
CommandlineCommandAcceptEULA::CommandlineCommandAcceptEULA(CommandLineParser* parser)
|
||||
: CommandlineCommand("accept-eula", "Accept the Sourcetrail End User License Agreement.", parser)
|
||||
{
|
||||
}
|
||||
|
||||
CommandlineCommandAcceptEULA::~CommandlineCommandAcceptEULA()
|
||||
{
|
||||
}
|
||||
|
||||
void CommandlineCommandAcceptEULA::setup()
|
||||
{
|
||||
}
|
||||
|
||||
void CommandlineCommandAcceptEULA::preparse()
|
||||
{
|
||||
m_parser->acceptEULA();
|
||||
}
|
||||
|
||||
CommandlineCommand::ReturnStatus CommandlineCommandAcceptEULA::parse(std::vector<std::string>& args)
|
||||
{
|
||||
return ReturnStatus::CMD_QUIT;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef COMMANDLINE_COMMAND_ACCEPT_EULA_H
|
||||
#define COMMANDLINE_COMMAND_ACCEPT_EULA_H
|
||||
|
||||
#include "CommandlineCommand.h"
|
||||
|
||||
class CommandLineParser;
|
||||
|
||||
namespace commandline
|
||||
{
|
||||
|
||||
class CommandlineCommandAcceptEULA
|
||||
: public CommandlineCommand
|
||||
{
|
||||
public:
|
||||
CommandlineCommandAcceptEULA(CommandLineParser* parser);
|
||||
virtual ~CommandlineCommandAcceptEULA();
|
||||
|
||||
virtual void setup();
|
||||
virtual void preparse();
|
||||
virtual ReturnStatus parse(std::vector<std::string>& args);
|
||||
|
||||
virtual bool hasHelp() const { return false; }
|
||||
};
|
||||
|
||||
} // namespace commandline
|
||||
|
||||
#endif // COMMANDLINE_COMMAND_ACCEPT_EULA_H
|
||||
@@ -121,10 +121,6 @@ void CommandlineCommandConfig::setup()
|
||||
m_options.add(options);
|
||||
}
|
||||
|
||||
void CommandlineCommandConfig::preparse()
|
||||
{
|
||||
}
|
||||
|
||||
CommandlineCommand::ReturnStatus CommandlineCommandConfig::parse(std::vector<std::string>& args)
|
||||
{
|
||||
po::variables_map vm;
|
||||
|
||||
@@ -14,7 +14,6 @@ public:
|
||||
virtual ~CommandlineCommandConfig();
|
||||
|
||||
virtual void setup();
|
||||
virtual void preparse();
|
||||
virtual ReturnStatus parse(std::vector<std::string>& args);
|
||||
|
||||
virtual bool hasHelp() const { return true; }
|
||||
|
||||
@@ -33,10 +33,6 @@ void CommandlineCommandIndex::setup()
|
||||
m_positional.add("project-file", 1);
|
||||
}
|
||||
|
||||
void CommandlineCommandIndex::preparse()
|
||||
{
|
||||
}
|
||||
|
||||
CommandlineCommand::ReturnStatus CommandlineCommandIndex::parse(std::vector<std::string>& args)
|
||||
{
|
||||
po::variables_map vm;
|
||||
|
||||
@@ -13,7 +13,6 @@ public:
|
||||
virtual ~CommandlineCommandIndex();
|
||||
|
||||
virtual void setup();
|
||||
virtual void preparse();
|
||||
virtual ReturnStatus parse(std::vector<std::string>& args);
|
||||
|
||||
virtual bool hasHelp() const { return true; }
|
||||
|
||||
Reference in New Issue
Block a user