Changeset View
Changeset View
Standalone View
Standalone View
src/core/kconfigini.cpp
Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Line(s) | 436 | for (KEntryMapIterator it = entryMap.begin(); it != end; ++it) { | |||
---|---|---|---|---|---|
437 | if (!it.key().mKey.isEmpty() && !it->bDirty) { // not dirty, doesn't overwrite entry in writeMap. skips default entries, too. | 437 | if (!it.key().mKey.isEmpty() && !it->bDirty) { // not dirty, doesn't overwrite entry in writeMap. skips default entries, too. | ||
438 | continue; | 438 | continue; | ||
439 | } | 439 | } | ||
440 | 440 | | |||
441 | const KEntryKey &key = it.key(); | 441 | const KEntryKey &key = it.key(); | ||
442 | 442 | | |||
443 | // only write entries that have the same "globality" as the file | 443 | // only write entries that have the same "globality" as the file | ||
444 | if (it->bGlobal == bGlobal) { | 444 | if (it->bGlobal == bGlobal) { | ||
445 | if (it->bReverted) { | 445 | if (it->bReverted && !it->bForceSave) { | ||
dfaure: Wouldn't it be enough to ensure that bReverted is false?
This would make for a much more… | |||||
446 | writeMap.remove(key); | 446 | writeMap.remove(key); | ||
447 | } else if (!it->bDeleted) { | 447 | } else if (!it->bDeleted) { | ||
448 | writeMap[key] = *it; | 448 | writeMap[key] = *it; | ||
449 | } else { | 449 | } else { | ||
450 | KEntryKey defaultKey = key; | 450 | KEntryKey defaultKey = key; | ||
451 | defaultKey.bDefault = true; | 451 | defaultKey.bDefault = true; | ||
452 | if (!entryMap.contains(defaultKey)) { | 452 | if (!entryMap.contains(defaultKey)) { | ||
453 | writeMap.remove(key); // remove the deleted entry if there is no default | 453 | writeMap.remove(key); // remove the deleted entry if there is no default | ||
▲ Show 20 Lines • Show All 480 Lines • Show Last 20 Lines |
Wouldn't it be enough to ensure that bReverted is false?
This would make for a much more minimal patch....