forked from qt-creator/qt-creator
Terminal: Simplify OpenTerminalParameters construction
Change-Id: I4dcc2146f227e4a408c88de62f7594953c8ccb66 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d222cc2dbd
commit
ce082bb09f
@@ -41,6 +41,20 @@ enum class ExitBehavior { Close, Restart, Keep };
|
||||
|
||||
struct OpenTerminalParameters
|
||||
{
|
||||
OpenTerminalParameters() = default;
|
||||
OpenTerminalParameters(const CommandLine &commandLine) : shellCommand(commandLine) {}
|
||||
OpenTerminalParameters(const FilePath &directory, std::optional<Environment> env) :
|
||||
workingDirectory(directory),
|
||||
environment(env)
|
||||
{}
|
||||
OpenTerminalParameters(const CommandLine &commandLine,
|
||||
const FilePath &directory,
|
||||
std::optional<Environment> env) :
|
||||
shellCommand(commandLine),
|
||||
workingDirectory(directory),
|
||||
environment(env)
|
||||
{}
|
||||
|
||||
std::optional<CommandLine> shellCommand;
|
||||
std::optional<FilePath> workingDirectory;
|
||||
std::optional<Environment> environment;
|
||||
|
||||
Reference in New Issue
Block a user