From 014a57c76499cdbb9803dca5a6b40d4e9b4e197f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 17 Jul 2020 09:04:53 +0200 Subject: [PATCH] Utils::Environment: Fix NameValueDictionary::diff() We missed the case where only the enabled/disabled status was different. Change-Id: Ic23e15f6843015feff2242cb67444dfa17cc5f2d Reviewed-by: hjk --- src/libs/utils/namevaluedictionary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/namevaluedictionary.cpp b/src/libs/utils/namevaluedictionary.cpp index b6218d95927..57eb2ffe995 100644 --- a/src/libs/utils/namevaluedictionary.cpp +++ b/src/libs/utils/namevaluedictionary.cpp @@ -154,7 +154,7 @@ NameValueItems NameValueDictionary::diff(const NameValueDictionary &other, bool const QString &newValue = otherIt.value().first; const bool oldEnabled = thisIt.value().second; const bool newEnabled = otherIt.value().second; - if (oldValue != newValue) { + if (oldValue != newValue || oldEnabled != newEnabled) { if (checkAppendPrepend && newValue.startsWith(oldValue) && oldEnabled == newEnabled) { QString appended = newValue.right(newValue.size() - oldValue.size());