summaryrefslogtreecommitdiff
path: root/src/libs/utils/environment.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-07-16 11:13:21 +0200
committerhjk <hjk@theqtcompany.com>2015-07-16 13:09:51 +0000
commit7a675e2d649fa9aca3b1da1189141fd5525bad15 (patch)
tree5e35106cfc4c0ebe11da84bc49e827c45a7e6636 /src/libs/utils/environment.cpp
parent799461ee7ab1c0e6ede542845a6791b2044c9d4c (diff)
downloadqt-creator-7a675e2d649fa9aca3b1da1189141fd5525bad15.tar.gz
Utils: Make Environment::diff() result not contain common entries
The resulting diff contained all the items that were equal as well. Since the function was unused so far, no real harm was done, but the function would be useful to have in the debugger. Change-Id: Ia0b0cea79cfc3ee5442aaf7bb392121590c0f338 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/environment.cpp')
-rw-r--r--src/libs/utils/environment.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp
index 500b016626..298987ee55 100644
--- a/src/libs/utils/environment.cpp
+++ b/src/libs/utils/environment.cpp
@@ -390,7 +390,8 @@ QList<EnvironmentItem> Environment::diff(const Environment &other) const
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
++otherIt;
} else {
- result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
+ if (thisIt.value() != otherIt.value())
+ result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
++otherIt;
++thisIt;
}