diff options
-rw-r--r-- | common/changereplay.h | 4 | ||||
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 2 | ||||
-rw-r--r-- | examples/imapresource/imapresource.cpp | 5 | ||||
-rw-r--r-- | examples/maildirresource/maildirresource.cpp | 3 |
4 files changed, 10 insertions, 4 deletions
diff --git a/common/changereplay.h b/common/changereplay.h index a568060..42736ca 100644 --- a/common/changereplay.h +++ b/common/changereplay.h | |||
@@ -59,8 +59,8 @@ private: | |||
59 | 59 | ||
60 | class NullChangeReplay : public ChangeReplay | 60 | class NullChangeReplay : public ChangeReplay |
61 | { | 61 | { |
62 | public: | 62 | public: |
63 | NullChangeReplay() : ChangeReplay("null") {} | 63 | NullChangeReplay(const QByteArray &resourceName) : ChangeReplay(resourceName) {} |
64 | KAsync::Job<void> replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | 64 | KAsync::Job<void> replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE { return KAsync::null<void>(); } |
65 | }; | 65 | }; |
66 | 66 | ||
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 674aca7..a443581 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp | |||
@@ -129,7 +129,7 @@ DummyResource::DummyResource(const QByteArray &instanceIdentifier, const QShared | |||
129 | : Sink::GenericResource(PLUGIN_NAME, instanceIdentifier, pipeline) | 129 | : Sink::GenericResource(PLUGIN_NAME, instanceIdentifier, pipeline) |
130 | { | 130 | { |
131 | setupSynchronizer(QSharedPointer<DummySynchronizer>::create(PLUGIN_NAME, instanceIdentifier)); | 131 | setupSynchronizer(QSharedPointer<DummySynchronizer>::create(PLUGIN_NAME, instanceIdentifier)); |
132 | setupChangereplay(QSharedPointer<Sink::NullChangeReplay>::create()); | 132 | setupChangereplay(QSharedPointer<Sink::NullChangeReplay>::create(instanceIdentifier)); |
133 | setupPreprocessors(ENTITY_TYPE_MAIL, | 133 | setupPreprocessors(ENTITY_TYPE_MAIL, |
134 | QVector<Sink::Preprocessor*>() << new DefaultIndexUpdater<Sink::ApplicationDomain::Mail>); | 134 | QVector<Sink::Preprocessor*>() << new DefaultIndexUpdater<Sink::ApplicationDomain::Mail>); |
135 | setupPreprocessors(ENTITY_TYPE_FOLDER, | 135 | setupPreprocessors(ENTITY_TYPE_FOLDER, |
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 72cc058..e725872 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -152,6 +152,9 @@ public: | |||
152 | // auto remoteIds = synchronizationTransaction.openDatabase("rid.mapping." + bufferType, std::function<void(const Sink::Storage::Error &)>(), true); | 152 | // auto remoteIds = synchronizationTransaction.openDatabase("rid.mapping." + bufferType, std::function<void(const Sink::Storage::Error &)>(), true); |
153 | auto mainDatabase = Sink::Storage::mainDatabase(transaction(), bufferType); | 153 | auto mainDatabase = Sink::Storage::mainDatabase(transaction(), bufferType); |
154 | mainDatabase.scan("", [&](const QByteArray &key, const QByteArray &) { | 154 | mainDatabase.scan("", [&](const QByteArray &key, const QByteArray &) { |
155 | if (Sink::Storage::isInternalKey(key)) { | ||
156 | return true; | ||
157 | } | ||
155 | callback(key); | 158 | callback(key); |
156 | return true; | 159 | return true; |
157 | }); | 160 | }); |
@@ -364,7 +367,7 @@ ImapResource::ImapResource(const QByteArray &instanceIdentifier, const QSharedPo | |||
364 | synchronizer->mPassword = mPassword; | 367 | synchronizer->mPassword = mPassword; |
365 | synchronizer->mResourceInstanceIdentifier = instanceIdentifier; | 368 | synchronizer->mResourceInstanceIdentifier = instanceIdentifier; |
366 | setupSynchronizer(synchronizer); | 369 | setupSynchronizer(synchronizer); |
367 | auto changereplay = QSharedPointer<Sink::NullChangeReplay>::create(); | 370 | auto changereplay = QSharedPointer<Sink::NullChangeReplay>::create(instanceIdentifier); |
368 | // auto changereplay = QSharedPointer<ImapWriteback>::create(PLUGIN_NAME, instanceIdentifier); | 371 | // auto changereplay = QSharedPointer<ImapWriteback>::create(PLUGIN_NAME, instanceIdentifier); |
369 | // changereplay->mServer = mServer; | 372 | // changereplay->mServer = mServer; |
370 | // changereplay->mPort = mPort; | 373 | // changereplay->mPort = mPort; |
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index eb35d39..67a2b43 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp | |||
@@ -289,6 +289,9 @@ public: | |||
289 | // auto remoteIds = synchronizationTransaction.openDatabase("rid.mapping." + bufferType, std::function<void(const Sink::Storage::Error &)>(), true); | 289 | // auto remoteIds = synchronizationTransaction.openDatabase("rid.mapping." + bufferType, std::function<void(const Sink::Storage::Error &)>(), true); |
290 | auto mainDatabase = Sink::Storage::mainDatabase(transaction(), bufferType); | 290 | auto mainDatabase = Sink::Storage::mainDatabase(transaction(), bufferType); |
291 | mainDatabase.scan("", [&](const QByteArray &key, const QByteArray &) { | 291 | mainDatabase.scan("", [&](const QByteArray &key, const QByteArray &) { |
292 | if (Sink::Storage::isInternalKey(key)) { | ||
293 | return true; | ||
294 | } | ||
292 | callback(key); | 295 | callback(key); |
293 | return true; | 296 | return true; |
294 | }); | 297 | }); |