Changeset View
Changeset View
Standalone View
Standalone View
src/core/kconfigdata.h
Show All 18 Lines | |||||
19 | * map/dict/list config node entry. | 19 | * map/dict/list config node entry. | ||
20 | * @internal | 20 | * @internal | ||
21 | */ | 21 | */ | ||
22 | struct KEntry { | 22 | struct KEntry { | ||
23 | /** Constructor. @internal */ | 23 | /** Constructor. @internal */ | ||
24 | KEntry() | 24 | KEntry() | ||
25 | : mValue(), bDirty(false), | 25 | : mValue(), bDirty(false), | ||
26 | bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false), bReverted(false), | 26 | bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false), bReverted(false), | ||
27 | bLocalizedCountry(false), bNotify(false) {} | 27 | bLocalizedCountry(false), bNotify(false), bOverridesGlobal(false) {} | ||
28 | /** @internal */ | 28 | /** @internal */ | ||
29 | QByteArray mValue; | 29 | QByteArray mValue; | ||
30 | /** | 30 | /** | ||
31 | * Must the entry be written back to disk? | 31 | * Must the entry be written back to disk? | ||
32 | */ | 32 | */ | ||
33 | bool bDirty : 1; | 33 | bool bDirty : 1; | ||
34 | /** | 34 | /** | ||
35 | * Entry should be written to the global config file | 35 | * Entry should be written to the global config file | ||
Show All 17 Lines | |||||
53 | bool bReverted: 1; | 53 | bool bReverted: 1; | ||
54 | /** | 54 | /** | ||
55 | * Entry is for a localized key. If @c false the value references just language e.g. "de", | 55 | * Entry is for a localized key. If @c false the value references just language e.g. "de", | ||
56 | * if @c true the value references language and country, e.g. "de_DE". | 56 | * if @c true the value references language and country, e.g. "de_DE". | ||
57 | **/ | 57 | **/ | ||
58 | bool bLocalizedCountry: 1; | 58 | bool bLocalizedCountry: 1; | ||
59 | 59 | | |||
60 | bool bNotify: 1; | 60 | bool bNotify: 1; | ||
61 | | ||||
62 | /** | ||||
63 | * Entry will need to be written on a non global file even if it matches default value | ||||
dfaure: s/wrote/written/
s/match/matches/ | |||||
ervin: nitpick: I think I'd write "non global" rather than "not global" | |||||
64 | */ | ||||
65 | bool bOverridesGlobal: 1; | ||||
61 | }; | 66 | }; | ||
62 | 67 | | |||
63 | // These operators are used to check whether an entry which is about | 68 | // These operators are used to check whether an entry which is about | ||
64 | // to be written equals the previous value. As such, this intentionally | 69 | // to be written equals the previous value. As such, this intentionally | ||
65 | // omits the dirty/notify flag from the comparison. | 70 | // omits the dirty/notify flag from the comparison. | ||
66 | inline bool operator ==(const KEntry &k1, const KEntry &k2) | 71 | inline bool operator ==(const KEntry &k1, const KEntry &k2) | ||
67 | { | 72 | { | ||
68 | return k1.bGlobal == k2.bGlobal && k1.bImmutable == k2.bImmutable | 73 | return k1.bGlobal == k2.bGlobal && k1.bImmutable == k2.bImmutable | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 161 | enum EntryOption { | |||
157 | EntryDirty = 1, | 162 | EntryDirty = 1, | ||
158 | EntryGlobal = 2, | 163 | EntryGlobal = 2, | ||
159 | EntryImmutable = 4, | 164 | EntryImmutable = 4, | ||
160 | EntryDeleted = 8, | 165 | EntryDeleted = 8, | ||
161 | EntryExpansion = 16, | 166 | EntryExpansion = 16, | ||
162 | EntryRawKey = 32, | 167 | EntryRawKey = 32, | ||
163 | EntryLocalizedCountry = 64, | 168 | EntryLocalizedCountry = 64, | ||
164 | EntryNotify = 128, | 169 | EntryNotify = 128, | ||
165 | EntryDefault = (SearchDefaults << 16), | 170 | EntryDefault = (SearchDefaults << 16), | ||
This enum value isn't set anywhere except in the unittest, no? dfaure: This enum value isn't set anywhere except in the unittest, no?
I guess it's here for… | |||||
166 | EntryLocalized = (SearchLocalized << 16) | 171 | EntryLocalized = (SearchLocalized << 16) | ||
167 | }; | 172 | }; | ||
168 | Q_DECLARE_FLAGS(EntryOptions, EntryOption) | 173 | Q_DECLARE_FLAGS(EntryOptions, EntryOption) | ||
169 | 174 | | |||
170 | Iterator findExactEntry(const QByteArray &group, const QByteArray &key = QByteArray(), | 175 | Iterator findExactEntry(const QByteArray &group, const QByteArray &key = QByteArray(), | ||
171 | SearchFlags flags = SearchFlags()); | 176 | SearchFlags flags = SearchFlags()); | ||
172 | 177 | | |||
173 | Iterator findEntry(const QByteArray &group, const QByteArray &key = QByteArray(), | 178 | Iterator findEntry(const QByteArray &group, const QByteArray &key = QByteArray(), | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |
s/wrote/written/
s/match/matches/