diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-06 16:19:51 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-10 10:40:01 +0200 |
commit | f689ad1021a7805f6f8b6a81f534b4cb9ca91f51 (patch) | |
tree | c18d746b775279f143c8d8052924bb4d83fbb91f /common/storage_common.cpp | |
parent | c3f6e72c2d46906a4699127b558ca248729ce577 (diff) | |
download | sink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.tar.gz sink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.zip |
Change replay
So far only includes modifications and additions,
removals are not yet stored as separate revisions.
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index dc02aec..512a13f 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -66,10 +66,7 @@ qint64 Storage::maxRevision(const Akonadi2::Storage::Transaction &transaction) | |||
66 | r = revision.toLongLong(); | 66 | r = revision.toLongLong(); |
67 | return false; | 67 | return false; |
68 | }, [](const Error &error){ | 68 | }, [](const Error &error){ |
69 | if (error.code != ErrorCodes::NotFound) { | 69 | std::cout << "Coultn'd find uid for revision "; |
70 | //FIXME | ||
71 | // defaultErrorHandler()(error); | ||
72 | } | ||
73 | }); | 70 | }); |
74 | return r; | 71 | return r; |
75 | } | 72 | } |
@@ -80,11 +77,8 @@ QByteArray Storage::getUidFromRevision(const Akonadi2::Storage::Transaction &tra | |||
80 | transaction.openDatabase("revisions").scan(QByteArray::number(revision), [&](const QByteArray &, const QByteArray &value) -> bool { | 77 | transaction.openDatabase("revisions").scan(QByteArray::number(revision), [&](const QByteArray &, const QByteArray &value) -> bool { |
81 | uid = value; | 78 | uid = value; |
82 | return false; | 79 | return false; |
83 | }, [](const Error &error){ | 80 | }, [revision](const Error &error){ |
84 | if (error.code != ErrorCodes::NotFound) { | 81 | std::cout << "Coultn'd find uid for revision " << revision; |
85 | //FIXME | ||
86 | // defaultErrorHandler()(error); | ||
87 | } | ||
88 | }); | 82 | }); |
89 | return uid; | 83 | return uid; |
90 | } | 84 | } |
@@ -95,11 +89,8 @@ QByteArray Storage::getTypeFromRevision(const Akonadi2::Storage::Transaction &tr | |||
95 | transaction.openDatabase("revisionType").scan(QByteArray::number(revision), [&](const QByteArray &, const QByteArray &value) -> bool { | 89 | transaction.openDatabase("revisionType").scan(QByteArray::number(revision), [&](const QByteArray &, const QByteArray &value) -> bool { |
96 | type = value; | 90 | type = value; |
97 | return false; | 91 | return false; |
98 | }, [](const Error &error){ | 92 | }, [revision](const Error &error){ |
99 | if (error.code != ErrorCodes::NotFound) { | 93 | std::cout << "Coultn'd find type for revision " << revision; |
100 | //FIXME | ||
101 | // defaultErrorHandler()(error); | ||
102 | } | ||
103 | }); | 94 | }); |
104 | return type; | 95 | return type; |
105 | } | 96 | } |