forked from qt-creator/qt-creator
Make terminal settings more flexible
Currently "Open Terminal Here" and such expect the terminal command without any arguments to be behaving correctly for this. That is not the case for Konsole at least, since it just opens another window in a running instance, with the same working directory, when not convinced to do otherwise with additional command line parameters Separate options for "Open Terminal Here" and "Run in terminal" in the options. Task-number: QTCREATORBUG-20900 Change-Id: I598d1f7f0bf22b5c21dc1c60333397bdf9fab1b4 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -27,6 +27,13 @@
|
||||
|
||||
namespace Utils {
|
||||
|
||||
TerminalCommand::TerminalCommand(const QString &command, const QString &openArgs, const QString &executeArgs)
|
||||
: command(command)
|
||||
, openArgs(openArgs)
|
||||
, executeArgs(executeArgs)
|
||||
{
|
||||
}
|
||||
|
||||
ConsoleProcess::~ConsoleProcess()
|
||||
{
|
||||
stop();
|
||||
@@ -151,4 +158,16 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS
|
||||
emit processError(errorString);
|
||||
}
|
||||
|
||||
bool TerminalCommand::operator==(const TerminalCommand &other) const
|
||||
{
|
||||
return other.command == command && other.executeArgs == executeArgs;
|
||||
}
|
||||
|
||||
bool TerminalCommand::operator<(const TerminalCommand &other) const
|
||||
{
|
||||
if (command == other.command)
|
||||
return executeArgs < other.executeArgs;
|
||||
return command < other.command;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user