diff options
Diffstat (limited to 'examples/dummyresource/resourcefactory.cpp')
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index e9bf6cd..e029308 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp | |||
@@ -31,6 +31,8 @@ | |||
31 | #include "log.h" | 31 | #include "log.h" |
32 | #include "domain/event.h" | 32 | #include "domain/event.h" |
33 | #include "dummystore.h" | 33 | #include "dummystore.h" |
34 | #include "definitions.h" | ||
35 | #include "facadefactory.h" | ||
34 | 36 | ||
35 | //This is the resources entity type, and not the domain type | 37 | //This is the resources entity type, and not the domain type |
36 | #define ENTITY_TYPE_EVENT "event" | 38 | #define ENTITY_TYPE_EVENT "event" |
@@ -46,7 +48,7 @@ DummyResource::DummyResource(const QByteArray &instanceIdentifier, const QShared | |||
46 | Akonadi2::ApplicationDomain::Event event(resourceIdentifier, state.key(), -1, adaptor); | 48 | Akonadi2::ApplicationDomain::Event event(resourceIdentifier, state.key(), -1, adaptor); |
47 | Akonadi2::ApplicationDomain::TypeImplementation<Akonadi2::ApplicationDomain::Event>::index(event); | 49 | Akonadi2::ApplicationDomain::TypeImplementation<Akonadi2::ApplicationDomain::Event>::index(event); |
48 | 50 | ||
49 | Index ridIndex(Akonadi2::Store::storageLocation(), resourceIdentifier + ".index.rid", Akonadi2::Storage::ReadWrite); | 51 | Index ridIndex(Akonadi2::storageLocation(), resourceIdentifier + ".index.rid", Akonadi2::Storage::ReadWrite); |
50 | const auto rid = event.getProperty("remoteId"); | 52 | const auto rid = event.getProperty("remoteId"); |
51 | if (rid.isValid()) { | 53 | if (rid.isValid()) { |
52 | ridIndex.add(rid.toByteArray(), event.identifier()); | 54 | ridIndex.add(rid.toByteArray(), event.identifier()); |
@@ -62,7 +64,7 @@ KAsync::Job<void> DummyResource::synchronizeWithSource() | |||
62 | { | 64 | { |
63 | return KAsync::start<void>([this](KAsync::Future<void> &f) { | 65 | return KAsync::start<void>([this](KAsync::Future<void> &f) { |
64 | //TODO start transaction on index | 66 | //TODO start transaction on index |
65 | Index uidIndex(Akonadi2::Store::storageLocation(), mResourceInstanceIdentifier + ".index.uid", Akonadi2::Storage::ReadOnly); | 67 | Index uidIndex(Akonadi2::storageLocation(), mResourceInstanceIdentifier + ".index.uid", Akonadi2::Storage::ReadOnly); |
66 | 68 | ||
67 | const auto data = DummyStore::instance().data(); | 69 | const auto data = DummyStore::instance().data(); |
68 | for (auto it = data.constBegin(); it != data.constEnd(); it++) { | 70 | for (auto it = data.constBegin(); it != data.constEnd(); it++) { |