diff options
Diffstat (limited to 'src/core/kconfigdata.cpp')
-rw-r--r-- | src/core/kconfigdata.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/kconfigdata.cpp b/src/core/kconfigdata.cpp index 109063d6..6ef6af07 100644 --- a/src/core/kconfigdata.cpp +++ b/src/core/kconfigdata.cpp @@ -145,6 +145,11 @@ bool KEntryMap::setEntry(const QByteArray &group, const QByteArray &key, const Q } e.bExpand = (options & EntryExpansion); e.bReverted = false; + if (options & EntryLocalized) { + e.bLocalizedCountry = (options & EntryLocalizedCountry); + } else { + e.bLocalizedCountry = false; + } if (newKey) { //qDebug() << "inserting" << k << "=" << value; @@ -158,6 +163,14 @@ bool KEntryMap::setEntry(const QByteArray &group, const QByteArray &key, const Q return true; } else { // KEntry e2 = it.value(); + if (options & EntryLocalized) { + // fast exit checks for cases where the existing entry is more specific + const KEntry &e2 = it.value(); + if (e2.bLocalizedCountry && !e.bLocalizedCountry) { + // lang_COUNTRY > lang + return false; + } + } if (it.value() != e) { //qDebug() << "changing" << k << "from" << e.mValue << "to" << value; it.value() = e; |