diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2018-09-06 12:39:05 +0200 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2018-09-07 07:07:22 +0000 |
| commit | 37a74cd9a34ccb9ab2e3fefcf5aa796fba5c0e08 (patch) | |
| tree | c94e923b4d43ed3ab7355b543123627d6eac86ff | |
| parent | a0e4a06f5ee398115d6ab2ba5ff8a2dc4107e51e (diff) | |
| download | qt-creator-37a74cd9a34ccb9ab2e3fefcf5aa796fba5c0e08.tar.gz | |
Fix terminal command comparison
It ignored the openArgs part.
Change-Id: Ib5df9cfd424aa7bcf63b2fa5d16ece0261ef0746
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| -rw-r--r-- | src/libs/utils/consoleprocess.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/utils/consoleprocess.cpp b/src/libs/utils/consoleprocess.cpp index 191570e312..335f9084c7 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; } |
