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