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