diff options
Diffstat (limited to 'common/facade.cpp')
-rw-r--r-- | common/facade.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/facade.cpp b/common/facade.cpp index 8cb776c..1b91ce4 100644 --- a/common/facade.cpp +++ b/common/facade.cpp | |||
@@ -29,6 +29,14 @@ | |||
29 | 29 | ||
30 | using namespace Sink; | 30 | using namespace Sink; |
31 | 31 | ||
32 | #undef DEBUG_AREA | ||
33 | #define DEBUG_AREA "client.facade" | ||
34 | |||
35 | /** | ||
36 | * A factory for resource access instances that caches the instance for some time. | ||
37 | * | ||
38 | * This avoids constantly recreating connections, and should allow a single process to have one connection per resource. | ||
39 | */ | ||
32 | class ResourceAccessFactory { | 40 | class ResourceAccessFactory { |
33 | public: | 41 | public: |
34 | static ResourceAccessFactory &instance() | 42 | static ResourceAccessFactory &instance() |
@@ -140,6 +148,7 @@ QPair<KAsync::Job<void>, typename ResultEmitter<typename DomainType::Ptr>::Ptr> | |||
140 | { | 148 | { |
141 | //The runner lives for the lifetime of the query | 149 | //The runner lives for the lifetime of the query |
142 | auto runner = new QueryRunner<DomainType>(query, mResourceAccess, mResourceInstanceIdentifier, mDomainTypeAdaptorFactory, bufferTypeForDomainType()); | 150 | auto runner = new QueryRunner<DomainType>(query, mResourceAccess, mResourceInstanceIdentifier, mDomainTypeAdaptorFactory, bufferTypeForDomainType()); |
151 | runner->setResultTransformation(mResultTransformation); | ||
143 | return qMakePair(KAsync::null<void>(), runner->emitter()); | 152 | return qMakePair(KAsync::null<void>(), runner->emitter()); |
144 | } | 153 | } |
145 | 154 | ||