Fix terminal command comparison

It ignored the openArgs part.

Change-Id: Ib5df9cfd424aa7bcf63b2fa5d16ece0261ef0746
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2018-09-06 12:39:05 +02:00
parent a0e4a06f5e
commit 37a74cd9a3

View File

@@ -160,13 +160,17 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS
bool TerminalCommand::operator==(const TerminalCommand &other) const bool TerminalCommand::operator==(const TerminalCommand &other) const
{ {
return other.command == command && other.executeArgs == executeArgs; return other.command == command && other.openArgs == openArgs
&& other.executeArgs == executeArgs;
} }
bool TerminalCommand::operator<(const TerminalCommand &other) const bool TerminalCommand::operator<(const TerminalCommand &other) const
{ {
if (command == other.command) if (command == other.command) {
if (openArgs == other.openArgs)
return executeArgs < other.executeArgs; return executeArgs < other.executeArgs;
return openArgs < other.openArgs;
}
return command < other.command; return command < other.command;
} }