Changeset View
Changeset View
Standalone View
Standalone View
src/akonadi/akonadistorage.cpp
Show All 33 Lines | |||||
34 | #include <AkonadiCore/CollectionModifyJob> | 34 | #include <AkonadiCore/CollectionModifyJob> | ||
35 | #include <AkonadiCore/ItemCreateJob> | 35 | #include <AkonadiCore/ItemCreateJob> | ||
36 | #include <AkonadiCore/ItemDeleteJob> | 36 | #include <AkonadiCore/ItemDeleteJob> | ||
37 | #include <AkonadiCore/ItemFetchJob> | 37 | #include <AkonadiCore/ItemFetchJob> | ||
38 | #include <AkonadiCore/ItemFetchScope> | 38 | #include <AkonadiCore/ItemFetchScope> | ||
39 | #include <AkonadiCore/ItemModifyJob> | 39 | #include <AkonadiCore/ItemModifyJob> | ||
40 | #include <AkonadiCore/ItemMoveJob> | 40 | #include <AkonadiCore/ItemMoveJob> | ||
41 | #include <AkonadiCore/TransactionSequence> | 41 | #include <AkonadiCore/TransactionSequence> | ||
42 | #include <AkonadiCore/TagCreateJob> | | |||
43 | #include <AkonadiCore/TagDeleteJob> | | |||
44 | #include <AkonadiCore/TagFetchJob> | 42 | #include <AkonadiCore/TagFetchJob> | ||
45 | #include <AkonadiCore/TagFetchScope> | 43 | #include <AkonadiCore/TagFetchScope> | ||
46 | #include <AkonadiCore/TagModifyJob> | | |||
47 | #include <AkonadiCore/TagAttribute> | 44 | #include <AkonadiCore/TagAttribute> | ||
ervin: I guess the three remaining includes about tags could go away as well, isn't it? Why isn't it… | |||||
I could probably remove TagAttribute, but TagFetchJobInterface *Storage::fetchTags() is still there at that point. Don't worry, it all goes away in the end. dfaure: I could probably remove TagAttribute, but `TagFetchJobInterface *Storage::fetchTags()` is still… | |||||
48 | #include "akonadi/akonadicollectionfetchjobinterface.h" | 45 | #include "akonadi/akonadicollectionfetchjobinterface.h" | ||
49 | #include "akonadi/akonadiitemfetchjobinterface.h" | 46 | #include "akonadi/akonadiitemfetchjobinterface.h" | ||
50 | #include "akonadi/akonaditagfetchjobinterface.h" | 47 | #include "akonadi/akonaditagfetchjobinterface.h" | ||
51 | #include "akonadi/akonadistoragesettings.h" | 48 | #include "akonadi/akonadistoragesettings.h" | ||
52 | 49 | | |||
53 | using namespace Akonadi; | 50 | using namespace Akonadi; | ||
54 | 51 | | |||
55 | class CollectionJob : public CollectionFetchJob, public CollectionFetchJobInterface | 52 | class CollectionJob : public CollectionFetchJob, public CollectionFetchJobInterface | ||
▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | 199 | { | |||
203 | return new CollectionDeleteJob(collection, parent); | 200 | return new CollectionDeleteJob(collection, parent); | ||
204 | } | 201 | } | ||
205 | 202 | | |||
206 | KJob *Storage::createTransaction() | 203 | KJob *Storage::createTransaction() | ||
207 | { | 204 | { | ||
208 | return new TransactionSequence(); | 205 | return new TransactionSequence(); | ||
209 | } | 206 | } | ||
210 | 207 | | |||
211 | KJob *Storage::createTag(Tag tag) | | |||
212 | { | | |||
213 | return new TagCreateJob(tag); | | |||
214 | } | | |||
215 | | ||||
216 | KJob *Storage::updateTag(Tag tag) | | |||
217 | { | | |||
218 | return new TagModifyJob(tag); | | |||
219 | } | | |||
220 | | ||||
221 | KJob *Storage::removeTag(Tag tag) | | |||
222 | { | | |||
223 | return new Akonadi::TagDeleteJob(tag); | | |||
224 | } | | |||
225 | | ||||
226 | CollectionFetchJobInterface *Storage::fetchCollections(Collection collection, StorageInterface::FetchDepth depth) | 208 | CollectionFetchJobInterface *Storage::fetchCollections(Collection collection, StorageInterface::FetchDepth depth) | ||
227 | { | 209 | { | ||
228 | auto job = new CollectionJob(collection, jobTypeFromDepth(depth)); | 210 | auto job = new CollectionJob(collection, jobTypeFromDepth(depth)); | ||
229 | 211 | | |||
230 | auto scope = job->fetchScope(); | 212 | auto scope = job->fetchScope(); | ||
231 | scope.setContentMimeTypes({KCalCore::Todo::todoMimeType()}); | 213 | scope.setContentMimeTypes({KCalCore::Todo::todoMimeType()}); | ||
232 | scope.setIncludeStatistics(true); | 214 | scope.setIncludeStatistics(true); | ||
233 | scope.setAncestorRetrieval(CollectionFetchScope::All); | 215 | scope.setAncestorRetrieval(CollectionFetchScope::All); | ||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
I guess the three remaining includes about tags could go away as well, isn't it? Why isn't it happening now?