summaryrefslogtreecommitdiffstats
path: root/examples/imapresource
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/imapresource
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/imapresource')
-rw-r--r--examples/imapresource/imapresource.cpp5
-rw-r--r--examples/imapresource/imapresource.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index aa0fb94..c72579c 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -714,3 +714,8 @@ void ImapResourceFactory::registerAdaptorFactories(Sink::AdaptorFactoryRegistry
714 registry.registerFactory<Sink::ApplicationDomain::Mail, ImapMailAdaptorFactory>(PLUGIN_NAME); 714 registry.registerFactory<Sink::ApplicationDomain::Mail, ImapMailAdaptorFactory>(PLUGIN_NAME);
715 registry.registerFactory<Sink::ApplicationDomain::Folder, ImapFolderAdaptorFactory>(PLUGIN_NAME); 715 registry.registerFactory<Sink::ApplicationDomain::Folder, ImapFolderAdaptorFactory>(PLUGIN_NAME);
716} 716}
717
718void ImapResourceFactory::removeDataFromDisk(const QByteArray &instanceIdentifier)
719{
720 ImapResource::removeFromDisk(instanceIdentifier);
721}
diff --git a/examples/imapresource/imapresource.h b/examples/imapresource/imapresource.h
index 534a04e..236e695 100644
--- a/examples/imapresource/imapresource.h
+++ b/examples/imapresource/imapresource.h
@@ -65,5 +65,6 @@ public:
65 Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE; 65 Sink::Resource *createResource(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE;
66 void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE; 66 void registerFacades(Sink::FacadeFactory &factory) Q_DECL_OVERRIDE;
67 void registerAdaptorFactories(Sink::AdaptorFactoryRegistry &registry) Q_DECL_OVERRIDE; 67 void registerAdaptorFactories(Sink::AdaptorFactoryRegistry &registry) Q_DECL_OVERRIDE;
68 void removeDataFromDisk(const QByteArray &instanceIdentifier) Q_DECL_OVERRIDE;
68}; 69};
69 70