forked from qt-creator/qt-creator
Utils: Properly terminate loop in Environment::diff()
The iterator needs to be tested against the end() of the same container. Change-Id: Ia4d208650d922d529ea074d4cd0eac9f4ac76b87 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -376,7 +376,7 @@ QList<EnvironmentItem> Environment::diff(const Environment &other) const
|
||||
if (thisIt == constEnd()) {
|
||||
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||
++otherIt;
|
||||
} else if (otherIt == constEnd()) {
|
||||
} else if (otherIt == other.constEnd()) {
|
||||
EnvironmentItem item(thisIt.key(), QString());
|
||||
item.unset = true;
|
||||
result.append(item);
|
||||
|
||||
Reference in New Issue
Block a user