diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-03-27 16:47:40 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-03-31 11:11:08 +0200 |
commit | 95fab4cac8217446684cfe6bd3f0218b0655530b (patch) | |
tree | 607b8beada461d46ae751a11fe7e9459d08033b1 | |
parent | 7642433a4fafd2ccf7e8b43c81ec18282f544a3b (diff) | |
download | sink-95fab4cac8217446684cfe6bd3f0218b0655530b.tar.gz sink-95fab4cac8217446684cfe6bd3f0218b0655530b.zip |
Minor cleanup, less warnings.
-rw-r--r-- | common/clientapi.cpp | 1 | ||||
-rw-r--r-- | common/clientapi.h | 5 | ||||
-rw-r--r-- | common/domainadaptor.h | 1 | ||||
-rw-r--r-- | dummyresource/domainadaptor.h | 1 | ||||
-rw-r--r-- | dummyresource/resourcefactory.cpp | 2 |
5 files changed, 9 insertions, 1 deletions
diff --git a/common/clientapi.cpp b/common/clientapi.cpp index 190bb57..10115da 100644 --- a/common/clientapi.cpp +++ b/common/clientapi.cpp | |||
@@ -34,6 +34,7 @@ QString getTypeName<Todo>() | |||
34 | void Store::shutdown(const QString &identifier) | 34 | void Store::shutdown(const QString &identifier) |
35 | { | 35 | { |
36 | Akonadi2::ResourceAccess resourceAccess(identifier); | 36 | Akonadi2::ResourceAccess resourceAccess(identifier); |
37 | //FIXME this starts the resource, just to shut it down again if it's not running in the first place. | ||
37 | resourceAccess.open(); | 38 | resourceAccess.open(); |
38 | resourceAccess.sendCommand(Akonadi2::Commands::ShutdownCommand).then<void>([](Async::Future<void> &f){ | 39 | resourceAccess.sendCommand(Akonadi2::Commands::ShutdownCommand).then<void>([](Async::Future<void> &f){ |
39 | //TODO wait for disconnect | 40 | //TODO wait for disconnect |
diff --git a/common/clientapi.h b/common/clientapi.h index aa47802..aa3aab8 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -179,6 +179,7 @@ namespace Domain { | |||
179 | */ | 179 | */ |
180 | class BufferAdaptor { | 180 | class BufferAdaptor { |
181 | public: | 181 | public: |
182 | virtual ~BufferAdaptor() {} | ||
182 | virtual QVariant getProperty(const QString &key) const { return QVariant(); } | 183 | virtual QVariant getProperty(const QString &key) const { return QVariant(); } |
183 | virtual void setProperty(const QString &key, const QVariant &value) {} | 184 | virtual void setProperty(const QString &key, const QVariant &value) {} |
184 | virtual QStringList availableProperties() const { return QStringList(); } | 185 | virtual QStringList availableProperties() const { return QStringList(); } |
@@ -199,6 +200,8 @@ public: | |||
199 | } | 200 | } |
200 | } | 201 | } |
201 | 202 | ||
203 | virtual ~MemoryBufferAdaptor() {} | ||
204 | |||
202 | virtual QVariant getProperty(const QString &key) const { return mValues.value(key); } | 205 | virtual QVariant getProperty(const QString &key) const { return mValues.value(key); } |
203 | virtual void setProperty(const QString &key, const QVariant &value) { mValues.insert(key, value); } | 206 | virtual void setProperty(const QString &key, const QVariant &value) { mValues.insert(key, value); } |
204 | virtual QStringList availableProperties() const { return mValues.keys(); } | 207 | virtual QStringList availableProperties() const { return mValues.keys(); } |
@@ -227,6 +230,8 @@ public: | |||
227 | { | 230 | { |
228 | } | 231 | } |
229 | 232 | ||
233 | virtual ~AkonadiDomainType() {} | ||
234 | |||
230 | virtual QVariant getProperty(const QString &key) const { return mAdaptor->getProperty(key); } | 235 | virtual QVariant getProperty(const QString &key) const { return mAdaptor->getProperty(key); } |
231 | virtual void setProperty(const QString &key, const QVariant &value){ mChangeSet.insert(key, value); mAdaptor->setProperty(key, value); } | 236 | virtual void setProperty(const QString &key, const QVariant &value){ mChangeSet.insert(key, value); mAdaptor->setProperty(key, value); } |
232 | 237 | ||
diff --git a/common/domainadaptor.h b/common/domainadaptor.h index 164c749..e46e893 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h | |||
@@ -67,6 +67,7 @@ template<typename DomainType, typename LocalBuffer, typename ResourceBuffer> | |||
67 | class DomainTypeAdaptorFactory/* <typename DomainType, LocalBuffer, ResourceBuffer> */ | 67 | class DomainTypeAdaptorFactory/* <typename DomainType, LocalBuffer, ResourceBuffer> */ |
68 | { | 68 | { |
69 | public: | 69 | public: |
70 | virtual ~DomainTypeAdaptorFactory() {}; | ||
70 | virtual QSharedPointer<Akonadi2::Domain::BufferAdaptor> createAdaptor(const Akonadi2::Entity &entity) = 0; | 71 | virtual QSharedPointer<Akonadi2::Domain::BufferAdaptor> createAdaptor(const Akonadi2::Entity &entity) = 0; |
71 | virtual void createBuffer(const Akonadi2::Domain::Event &event, flatbuffers::FlatBufferBuilder &fbb) {}; | 72 | virtual void createBuffer(const Akonadi2::Domain::Event &event, flatbuffers::FlatBufferBuilder &fbb) {}; |
72 | 73 | ||
diff --git a/dummyresource/domainadaptor.h b/dummyresource/domainadaptor.h index 239ceca..9474176 100644 --- a/dummyresource/domainadaptor.h +++ b/dummyresource/domainadaptor.h | |||
@@ -10,6 +10,7 @@ class DummyEventAdaptorFactory : public DomainTypeAdaptorFactory<Akonadi2::Domai | |||
10 | { | 10 | { |
11 | public: | 11 | public: |
12 | DummyEventAdaptorFactory(); | 12 | DummyEventAdaptorFactory(); |
13 | virtual ~DummyEventAdaptorFactory() {}; | ||
13 | virtual QSharedPointer<Akonadi2::Domain::BufferAdaptor> createAdaptor(const Akonadi2::Entity &entity); | 14 | virtual QSharedPointer<Akonadi2::Domain::BufferAdaptor> createAdaptor(const Akonadi2::Entity &entity); |
14 | virtual void createBuffer(const Akonadi2::Domain::Event &event, flatbuffers::FlatBufferBuilder &fbb); | 15 | virtual void createBuffer(const Akonadi2::Domain::Event &event, flatbuffers::FlatBufferBuilder &fbb); |
15 | }; | 16 | }; |
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp index fab3df9..d1beb1d 100644 --- a/dummyresource/resourcefactory.cpp +++ b/dummyresource/resourcefactory.cpp | |||
@@ -248,7 +248,7 @@ void DummyResource::configurePipeline(Akonadi2::Pipeline *pipeline) | |||
248 | auto eventFactory = QSharedPointer<DummyEventAdaptorFactory>::create(); | 248 | auto eventFactory = QSharedPointer<DummyEventAdaptorFactory>::create(); |
249 | //FIXME we should setup for each resource entity type, not for each domain type | 249 | //FIXME we should setup for each resource entity type, not for each domain type |
250 | //i.e. If a resource stores tags as part of each message it needs to update the tag index | 250 | //i.e. If a resource stores tags as part of each message it needs to update the tag index |
251 | //TODO setup preprocessors for each domain type and pipeline type allowing full customization | 251 | //TODO setup preprocessors for each resource entity type and pipeline type allowing full customization |
252 | //Eventually the order should be self configuring, for now it's hardcoded. | 252 | //Eventually the order should be self configuring, for now it's hardcoded. |
253 | auto eventIndexer = new SimpleProcessor("summaryprocessor", [eventFactory](const Akonadi2::PipelineState &state, const Akonadi2::Entity &entity) { | 253 | auto eventIndexer = new SimpleProcessor("summaryprocessor", [eventFactory](const Akonadi2::PipelineState &state, const Akonadi2::Entity &entity) { |
254 | auto adaptor = eventFactory->createAdaptor(entity); | 254 | auto adaptor = eventFactory->createAdaptor(entity); |