diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-31 09:48:32 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-31 09:48:32 +0200 |
commit | cec73d506f6481631c1aa508f5e470e348e462da (patch) | |
tree | 61036ff0fc89be2b2a5ef68b0a24df4d94eb41d2 /examples/imapresource/imapresource.cpp | |
parent | 8588cd99ee9f3ba92a7167be3752fe511200131b (diff) | |
download | sink-cec73d506f6481631c1aa508f5e470e348e462da.tar.gz sink-cec73d506f6481631c1aa508f5e470e348e462da.zip |
Open a valid database also in the NullChangeReplay and skip internal keys
Diffstat (limited to 'examples/imapresource/imapresource.cpp')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; |