Changeset View
Changeset View
Standalone View
Standalone View
src/core/collection_p.h
Show All 39 Lines | 39 | public: | |||
---|---|---|---|---|---|
40 | CollectionPrivate(Collection::Id id = -1) | 40 | CollectionPrivate(Collection::Id id = -1) | ||
41 | : QSharedData() | 41 | : QSharedData() | ||
42 | , displayPreference(Collection::ListDefault) | 42 | , displayPreference(Collection::ListDefault) | ||
43 | , syncPreference(Collection::ListDefault) | 43 | , syncPreference(Collection::ListDefault) | ||
44 | , indexPreference(Collection::ListDefault) | 44 | , indexPreference(Collection::ListDefault) | ||
45 | , listPreferenceChanged(false) | 45 | , listPreferenceChanged(false) | ||
46 | , enabled(true) | 46 | , enabled(true) | ||
47 | , enabledChanged(false) | 47 | , enabledChanged(false) | ||
48 | , referenced(false) | | |||
49 | , referencedChanged(false) | | |||
50 | , contentTypesChanged(false) | 48 | , contentTypesChanged(false) | ||
51 | , cachePolicyChanged(false) | 49 | , cachePolicyChanged(false) | ||
52 | , isVirtual(false) | 50 | , isVirtual(false) | ||
53 | , mId(id) | 51 | , mId(id) | ||
54 | , mParent(nullptr) | 52 | , mParent(nullptr) | ||
55 | { | 53 | { | ||
56 | } | 54 | } | ||
57 | 55 | | |||
Show All 17 Lines | 59 | { | |||
75 | cachePolicyChanged = other.cachePolicyChanged; | 73 | cachePolicyChanged = other.cachePolicyChanged; | ||
76 | isVirtual = other.isVirtual; | 74 | isVirtual = other.isVirtual; | ||
77 | enabled = other.enabled; | 75 | enabled = other.enabled; | ||
78 | enabledChanged = other.enabledChanged; | 76 | enabledChanged = other.enabledChanged; | ||
79 | displayPreference = other.displayPreference; | 77 | displayPreference = other.displayPreference; | ||
80 | syncPreference = other.syncPreference; | 78 | syncPreference = other.syncPreference; | ||
81 | indexPreference = other.indexPreference; | 79 | indexPreference = other.indexPreference; | ||
82 | listPreferenceChanged = other.listPreferenceChanged; | 80 | listPreferenceChanged = other.listPreferenceChanged; | ||
83 | referenced = other.referenced; | | |||
84 | referencedChanged = other.referencedChanged; | | |||
85 | keepLocalChanges = other.keepLocalChanges; | 81 | keepLocalChanges = other.keepLocalChanges; | ||
86 | } | 82 | } | ||
87 | 83 | | |||
88 | ~CollectionPrivate() | 84 | ~CollectionPrivate() | ||
89 | { | 85 | { | ||
90 | delete mParent; | 86 | delete mParent; | ||
91 | } | 87 | } | ||
92 | 88 | | |||
93 | void resetChangeLog() | 89 | void resetChangeLog() | ||
94 | { | 90 | { | ||
95 | contentTypesChanged = false; | 91 | contentTypesChanged = false; | ||
96 | cachePolicyChanged = false; | 92 | cachePolicyChanged = false; | ||
97 | enabledChanged = false; | 93 | enabledChanged = false; | ||
98 | listPreferenceChanged = false; | 94 | listPreferenceChanged = false; | ||
99 | referencedChanged = false; | | |||
100 | mAttributeStorage.resetChangeLog(); | 95 | mAttributeStorage.resetChangeLog(); | ||
101 | } | 96 | } | ||
102 | 97 | | |||
103 | static Collection newRoot() | 98 | static Collection newRoot() | ||
104 | { | 99 | { | ||
105 | Collection rootCollection(0); | 100 | Collection rootCollection(0); | ||
106 | rootCollection.setContentMimeTypes({ Collection::mimeType() }); | 101 | rootCollection.setContentMimeTypes({ Collection::mimeType() }); | ||
107 | return rootCollection; | 102 | return rootCollection; | ||
108 | } | 103 | } | ||
109 | 104 | | |||
110 | // Make use of the 4-bytes padding from QSharedData | 105 | // Make use of the 4-bytes padding from QSharedData | ||
111 | Collection::ListPreference displayPreference: 2; | 106 | Collection::ListPreference displayPreference: 2; | ||
112 | Collection::ListPreference syncPreference: 2; | 107 | Collection::ListPreference syncPreference: 2; | ||
113 | Collection::ListPreference indexPreference: 2; | 108 | Collection::ListPreference indexPreference: 2; | ||
114 | bool listPreferenceChanged: 1; | 109 | bool listPreferenceChanged: 1; | ||
115 | bool enabled: 1; | 110 | bool enabled: 1; | ||
116 | bool enabledChanged: 1; | 111 | bool enabledChanged: 1; | ||
117 | bool referenced: 1; | | |||
118 | bool referencedChanged: 1; | | |||
119 | bool contentTypesChanged: 1; | 112 | bool contentTypesChanged: 1; | ||
120 | bool cachePolicyChanged: 1; | 113 | bool cachePolicyChanged: 1; | ||
121 | bool isVirtual: 1; | 114 | bool isVirtual: 1; | ||
122 | // 2 bytes padding here | 115 | // 2 bytes padding here | ||
123 | 116 | | |||
124 | Collection::Id mId; | 117 | Collection::Id mId; | ||
125 | QString mRemoteId; | 118 | QString mRemoteId; | ||
126 | QString mRemoteRevision; | 119 | QString mRemoteRevision; | ||
Show All 13 Lines |