summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-22 18:22:39 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-22 18:22:39 +0100
commitb2ad8f785e801a35cadf254d827f56d648be510c (patch)
tree4eeb1e3eefb02c40dac40469c0fae5ad91feb3e3 /examples
parent1fe8664ec74165fc3f250098609ea0e049e3adc8 (diff)
downloadsink-b2ad8f785e801a35cadf254d827f56d648be510c.tar.gz
sink-b2ad8f785e801a35cadf254d827f56d648be510c.zip
Introduced Log::Context
To have hierarchical debug output we have to pass around something at run-time, there is no reasonable alternative. Log::Context provides the identifier to do just that and largely replaces the debug component idea.
Diffstat (limited to 'examples')
-rw-r--r--examples/imapresource/imapresource.cpp2
-rw-r--r--examples/maildirresource/facade.cpp5
-rw-r--r--examples/maildirresource/facade.h1
-rw-r--r--examples/maildirresource/maildirresource.cpp2
4 files changed, 2 insertions, 8 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index e16a8d7..7d71136 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -579,7 +579,7 @@ protected:
579 auto mainStore = QSharedPointer<Sink::Storage::DataStore>::create(Sink::storageLocation(), mResourceContext.instanceId(), Sink::Storage::DataStore::ReadOnly); 579 auto mainStore = QSharedPointer<Sink::Storage::DataStore>::create(Sink::storageLocation(), mResourceContext.instanceId(), Sink::Storage::DataStore::ReadOnly);
580 auto transaction = mainStore->createTransaction(Sink::Storage::DataStore::ReadOnly); 580 auto transaction = mainStore->createTransaction(Sink::Storage::DataStore::ReadOnly);
581 581
582 Sink::Storage::EntityStore entityStore(mResourceContext); 582 Sink::Storage::EntityStore entityStore(mResourceContext, {"imapresource"});
583 auto syncStore = QSharedPointer<Sink::SynchronizerStore>::create(synchronizationTransaction); 583 auto syncStore = QSharedPointer<Sink::SynchronizerStore>::create(synchronizationTransaction);
584 584
585 SinkTrace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue; 585 SinkTrace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue;
diff --git a/examples/maildirresource/facade.cpp b/examples/maildirresource/facade.cpp
index d26b86c..13ceaaf 100644
--- a/examples/maildirresource/facade.cpp
+++ b/examples/maildirresource/facade.cpp
@@ -55,11 +55,6 @@ MaildirResourceMailFacade::~MaildirResourceMailFacade()
55{ 55{
56} 56}
57 57
58QPair<KAsync::Job<void>, Sink::ResultEmitter<Sink::ApplicationDomain::Mail::Ptr>::Ptr> MaildirResourceMailFacade::load(const Sink::Query &query)
59{
60 return Sink::GenericFacade<Sink::ApplicationDomain::Mail>::load(query);
61}
62
63 58
64MaildirResourceFolderFacade::MaildirResourceFolderFacade(const Sink::ResourceContext &context) 59MaildirResourceFolderFacade::MaildirResourceFolderFacade(const Sink::ResourceContext &context)
65 : Sink::GenericFacade<Sink::ApplicationDomain::Folder>(context) 60 : Sink::GenericFacade<Sink::ApplicationDomain::Folder>(context)
diff --git a/examples/maildirresource/facade.h b/examples/maildirresource/facade.h
index fdb693e..6b96fef 100644
--- a/examples/maildirresource/facade.h
+++ b/examples/maildirresource/facade.h
@@ -26,7 +26,6 @@ class MaildirResourceMailFacade : public Sink::GenericFacade<Sink::ApplicationDo
26public: 26public:
27 MaildirResourceMailFacade(const Sink::ResourceContext &context); 27 MaildirResourceMailFacade(const Sink::ResourceContext &context);
28 virtual ~MaildirResourceMailFacade(); 28 virtual ~MaildirResourceMailFacade();
29 QPair<KAsync::Job<void>, Sink::ResultEmitter<Sink::ApplicationDomain::Mail::Ptr>::Ptr> load(const Sink::Query &query) Q_DECL_OVERRIDE;
30}; 29};
31 30
32class MaildirResourceFolderFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Folder> 31class MaildirResourceFolderFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Folder>
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp
index 997ddef..b64e8d3 100644
--- a/examples/maildirresource/maildirresource.cpp
+++ b/examples/maildirresource/maildirresource.cpp
@@ -454,7 +454,7 @@ protected:
454 auto mainStore = QSharedPointer<Sink::Storage::DataStore>::create(Sink::storageLocation(), mResourceContext.instanceId(), Sink::Storage::DataStore::ReadOnly); 454 auto mainStore = QSharedPointer<Sink::Storage::DataStore>::create(Sink::storageLocation(), mResourceContext.instanceId(), Sink::Storage::DataStore::ReadOnly);
455 auto transaction = mainStore->createTransaction(Sink::Storage::DataStore::ReadOnly); 455 auto transaction = mainStore->createTransaction(Sink::Storage::DataStore::ReadOnly);
456 456
457 Sink::Storage::EntityStore entityStore(mResourceContext); 457 Sink::Storage::EntityStore entityStore(mResourceContext, {"maildirresource"});
458 auto syncStore = QSharedPointer<SynchronizerStore>::create(synchronizationTransaction); 458 auto syncStore = QSharedPointer<SynchronizerStore>::create(synchronizationTransaction);
459 459
460 SinkTrace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue; 460 SinkTrace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue;