diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-10-07 15:38:08 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-10-07 15:38:08 +0200 |
commit | 8499c2d29b082f35ac2eb55f7633e0d4103cefe5 (patch) | |
tree | a85e7ab63f8cc96f71d6aca979c3f8d22ca76086 /examples/dummyresource | |
parent | 53d571a4ba75474a6d12d0de6b4059c83578e94b (diff) | |
download | sink-8499c2d29b082f35ac2eb55f7633e0d4103cefe5.tar.gz sink-8499c2d29b082f35ac2eb55f7633e0d4103cefe5.zip |
Avoid using the resource object to remove the data from disk.
...because creating it will potentially start transactions on the
database we're about to remove.
Diffstat (limited to 'examples/dummyresource')
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 4 | ||||
-rw-r--r-- | examples/dummyresource/resourcefactory.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 221e20d..6d14721 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp | |||
@@ -201,3 +201,7 @@ void DummyResourceFactory::registerAdaptorFactories(Sink::AdaptorFactoryRegistry | |||
201 | registry.registerFactory<Sink::ApplicationDomain::Event, DummyEventAdaptorFactory>(PLUGIN_NAME); | 201 | registry.registerFactory<Sink::ApplicationDomain::Event, DummyEventAdaptorFactory>(PLUGIN_NAME); |
202 | } | 202 | } |
203 | 203 | ||
204 | void DummyResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier) | ||
205 | { | ||
206 | DummyResource::removeFromDisk(instanceIdentifier); | ||
207 | } | ||
diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index 9192c68..0a29d53 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h | |||
@@ -51,5 +51,6 @@ public: | |||
51 | Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | 51 | Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; |
52 | void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; | 52 | void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; |
53 | void registerAdaptorFactories(Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; | 53 | void registerAdaptorFactories(Sink::AdaptorFactoryRegistry ®istry) Q_DECL_OVERRIDE; |
54 | void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; | ||
54 | }; | 55 | }; |
55 | 56 | ||