Utils::Environment: Fix NameValueDictionary::diff()

We missed the case where only the enabled/disabled status was different.

Change-Id: Ic23e15f6843015feff2242cb67444dfa17cc5f2d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-07-17 09:04:53 +02:00
parent e978f59654
commit 014a57c764

View File

@@ -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());