diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 9 | ||||
-rw-r--r-- | examples/dummyresource/resourcefactory.h | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index e244131..de13aa9 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp | |||
@@ -105,9 +105,8 @@ QMap<QString, QString> populate() | |||
105 | static QMap<QString, QString> s_dataSource = populate(); | 105 | static QMap<QString, QString> s_dataSource = populate(); |
106 | 106 | ||
107 | 107 | ||
108 | //FIXME We need to pass the resource-instance name to generic resource, not the plugin name | 108 | DummyResource::DummyResource(const QByteArray &instanceIdentifier) |
109 | DummyResource::DummyResource() | 109 | : Akonadi2::GenericResource(instanceIdentifier) |
110 | : Akonadi2::GenericResource(PLUGIN_NAME ".instance1") | ||
111 | { | 110 | { |
112 | } | 111 | } |
113 | 112 | ||
@@ -213,9 +212,9 @@ DummyResourceFactory::DummyResourceFactory(QObject *parent) | |||
213 | 212 | ||
214 | } | 213 | } |
215 | 214 | ||
216 | Akonadi2::Resource *DummyResourceFactory::createResource() | 215 | Akonadi2::Resource *DummyResourceFactory::createResource(const QByteArray &instanceIdentifier) |
217 | { | 216 | { |
218 | return new DummyResource(); | 217 | return new DummyResource(instanceIdentifier); |
219 | } | 218 | } |
220 | 219 | ||
221 | void DummyResourceFactory::registerFacades(Akonadi2::FacadeFactory &factory) | 220 | void DummyResourceFactory::registerFacades(Akonadi2::FacadeFactory &factory) |
diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index f5caf61..f2362bc 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h | |||
@@ -32,7 +32,7 @@ | |||
32 | class DummyResource : public Akonadi2::GenericResource | 32 | class DummyResource : public Akonadi2::GenericResource |
33 | { | 33 | { |
34 | public: | 34 | public: |
35 | DummyResource(); | 35 | DummyResource(const QByteArray &instanceIdentifier); |
36 | KAsync::Job<void> synchronizeWithSource(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; | 36 | KAsync::Job<void> synchronizeWithSource(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; |
37 | void configurePipeline(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; | 37 | void configurePipeline(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; |
38 | }; | 38 | }; |
@@ -46,7 +46,7 @@ class DummyResourceFactory : public Akonadi2::ResourceFactory | |||
46 | public: | 46 | public: |
47 | DummyResourceFactory(QObject *parent = 0); | 47 | DummyResourceFactory(QObject *parent = 0); |
48 | 48 | ||
49 | Akonadi2::Resource *createResource(); | 49 | Akonadi2::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; |
50 | void registerFacades(Akonadi2::FacadeFactory &factory); | 50 | void registerFacades(Akonadi2::FacadeFactory &factory) Q_DECL_OVERRIDE; |
51 | }; | 51 | }; |
52 | 52 | ||