Changeset View
Changeset View
Standalone View
Standalone View
src/core/kconfigdata.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 72 | { | |||
---|---|---|---|---|---|
95 | 95 | | |||
96 | if (it != end()) { | 96 | if (it != end()) { | ||
97 | if (it->bImmutable) { | 97 | if (it->bImmutable) { | ||
98 | return false; // we cannot change this entry. Inherits group immutability. | 98 | return false; // we cannot change this entry. Inherits group immutability. | ||
99 | } | 99 | } | ||
100 | k = it.key(); | 100 | k = it.key(); | ||
101 | e = *it; | 101 | e = *it; | ||
102 | //qDebug() << "found existing entry for key" << k; | 102 | //qDebug() << "found existing entry for key" << k; | ||
103 | // If overridden entry is global and not default. And it's overridden by a non global | ||||
104 | if (e.bGlobal && !(options & EntryGlobal) && !k.bDefault) { | ||||
105 | e.bOverridesGlobal = true; | ||||
ervin: Should be at the end of the previous line | |||||
106 | } | ||||
103 | } else { | 107 | } else { | ||
104 | // make sure the group marker is in the map | 108 | // make sure the group marker is in the map | ||
105 | KEntryMap const *that = this; | 109 | KEntryMap const *that = this; | ||
106 | ConstIterator cit = that->findEntry(group); | 110 | ConstIterator cit = that->findEntry(group); | ||
107 | if (cit == constEnd()) { | 111 | if (cit == constEnd()) { | ||
108 | insert(KEntryKey(group), KEntry()); | 112 | insert(KEntryKey(group), KEntry()); | ||
109 | } else if (cit->bImmutable) { | 113 | } else if (cit->bImmutable) { | ||
110 | return false; // this group is immutable, so we cannot change this entry. | 114 | return false; // this group is immutable, so we cannot change this entry. | ||
111 | } | 115 | } | ||
112 | 116 | | |||
113 | k = KEntryKey(group, key); | 117 | k = KEntryKey(group, key); | ||
114 | newKey = true; | 118 | newKey = true; | ||
115 | } | 119 | } | ||
116 | 120 | | |||
117 | // set these here, since we may be changing the type of key from the one we found | 121 | // set these here, since we may be changing the type of key from the one we found | ||
118 | k.bLocal = (options & EntryLocalized); | 122 | k.bLocal = (options & EntryLocalized); | ||
119 | k.bDefault = (options & EntryDefault); | 123 | k.bDefault = (options & EntryDefault); | ||
120 | k.bRaw = (options & EntryRawKey); | 124 | k.bRaw = (options & EntryRawKey); | ||
121 | 125 | | |||
122 | e.mValue = value; | 126 | e.mValue = value; | ||
123 | e.bDirty = e.bDirty || (options & EntryDirty); | 127 | e.bDirty = e.bDirty || (options & EntryDirty); | ||
124 | e.bNotify = e.bNotify || (options & EntryNotify); | 128 | e.bNotify = e.bNotify || (options & EntryNotify); | ||
125 | 129 | | |||
126 | e.bGlobal = (options & EntryGlobal); //we can't use || here, because changes to entries in | 130 | e.bGlobal = (options & EntryGlobal); //we can't use || here, because changes to entries in | ||
meven: s/overidded/overridden | |||||
127 | //kdeglobals would be written to kdeglobals instead | 131 | //kdeglobals would be written to kdeglobals instead | ||
128 | //of the local config file, regardless of the globals flag | 132 | //of the local config file, regardless of the globals flag | ||
129 | e.bImmutable = e.bImmutable || (options & EntryImmutable); | 133 | e.bImmutable = e.bImmutable || (options & EntryImmutable); | ||
130 | if (value.isNull()) { | 134 | if (value.isNull()) { | ||
131 | e.bDeleted = e.bDeleted || (options & EntryDeleted); | 135 | e.bDeleted = e.bDeleted || (options & EntryDeleted); | ||
132 | } else { | 136 | } else { | ||
133 | e.bDeleted = false; // setting a value to a previously deleted entry | 137 | e.bDeleted = false; // setting a value to a previously deleted entry | ||
134 | } | 138 | } | ||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |
Should be at the end of the previous line