forked from qt-creator/qt-creator
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:
@@ -154,7 +154,7 @@ NameValueItems NameValueDictionary::diff(const NameValueDictionary &other, bool
|
|||||||
const QString &newValue = otherIt.value().first;
|
const QString &newValue = otherIt.value().first;
|
||||||
const bool oldEnabled = thisIt.value().second;
|
const bool oldEnabled = thisIt.value().second;
|
||||||
const bool newEnabled = otherIt.value().second;
|
const bool newEnabled = otherIt.value().second;
|
||||||
if (oldValue != newValue) {
|
if (oldValue != newValue || oldEnabled != newEnabled) {
|
||||||
if (checkAppendPrepend && newValue.startsWith(oldValue)
|
if (checkAppendPrepend && newValue.startsWith(oldValue)
|
||||||
&& oldEnabled == newEnabled) {
|
&& oldEnabled == newEnabled) {
|
||||||
QString appended = newValue.right(newValue.size() - oldValue.size());
|
QString appended = newValue.right(newValue.size() - oldValue.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user