From 37a74cd9a34ccb9ab2e3fefcf5aa796fba5c0e08 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 6 Sep 2018 12:39:05 +0200 Subject: [PATCH] Fix terminal command comparison It ignored the openArgs part. Change-Id: Ib5df9cfd424aa7bcf63b2fa5d16ece0261ef0746 Reviewed-by: Orgad Shaneh --- src/libs/utils/consoleprocess.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/consoleprocess.cpp b/src/libs/utils/consoleprocess.cpp index 191570e312d..335f9084c7e 100644 --- a/src/libs/utils/consoleprocess.cpp +++ b/src/libs/utils/consoleprocess.cpp @@ -160,13 +160,17 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS 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 { - if (command == other.command) - return executeArgs < other.executeArgs; + if (command == other.command) { + if (openArgs == other.openArgs) + return executeArgs < other.executeArgs; + return openArgs < other.openArgs; + } return command < other.command; }