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>
This commit is contained in:
hjk
2015-07-16 11:13:21 +02:00
parent 799461ee7a
commit 7a675e2d64

View File

@@ -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;
}