summaryrefslogtreecommitdiffstats
path: root/examples/mailtransportresource
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-07 15:38:08 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-07 15:38:08 +0200
commit8499c2d29b082f35ac2eb55f7633e0d4103cefe5 (patch)
treea85e7ab63f8cc96f71d6aca979c3f8d22ca76086 /examples/mailtransportresource
parent53d571a4ba75474a6d12d0de6b4059c83578e94b (diff)
downloadsink-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/mailtransportresource')
-rw-r--r--examples/mailtransportresource/mailtransportresource.cpp5
-rw-r--r--examples/mailtransportresource/mailtransportresource.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/examples/mailtransportresource/mailtransportresource.cpp b/examples/mailtransportresource/mailtransportresource.cpp
index be4e4e0..3ce9476 100644
--- a/examples/mailtransportresource/mailtransportresource.cpp
+++ b/examples/mailtransportresource/mailtransportresource.cpp
@@ -205,3 +205,8 @@ void MailtransportResourceFactory::registerAdaptorFactories(Sink::AdaptorFactory
205{ 205{
206 registry.registerFactory<Sink::ApplicationDomain::Mail, DomainTypeAdaptorFactory<ApplicationDomain::Mail>>(PLUGIN_NAME); 206 registry.registerFactory<Sink::ApplicationDomain::Mail, DomainTypeAdaptorFactory<ApplicationDomain::Mail>>(PLUGIN_NAME);
207} 207}
208
209void MailtransportResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier)
210{
211 MailtransportResource::removeFromDisk(instanceIdentifier);
212}
diff --git a/examples/mailtransportresource/mailtransportresource.h b/examples/mailtransportresource/mailtransportresource.h
index cf6abf2..dcc33df 100644
--- a/examples/mailtransportresource/mailtransportresource.h
+++ b/examples/mailtransportresource/mailtransportresource.h
@@ -55,5 +55,6 @@ public:
55 Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; 55 Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE;
56 void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; 56 void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE;
57 void registerAdaptorFactories(Sink::AdaptorFactoryRegistry &registry) Q_DECL_OVERRIDE; 57 void registerAdaptorFactories(Sink::AdaptorFactoryRegistry &registry) Q_DECL_OVERRIDE;
58 void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE;
58}; 59};
59 60