diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-07 21:48:44 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-07 21:48:44 +0100 |
commit | 89b6f63bab839ab0504cd3067f0389afe4dc47e3 (patch) | |
tree | 62c527983d63827bb722010ea8c59d5af0e5a879 /examples/dummyresource | |
parent | 438c74630e5f8c9a46d00b991f5cb8ecd479dafe (diff) | |
download | sink-89b6f63bab839ab0504cd3067f0389afe4dc47e3.tar.gz sink-89b6f63bab839ab0504cd3067f0389afe4dc47e3.zip |
Implement debug stream operators for query.
Diffstat (limited to 'examples/dummyresource')
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 6 | ||||
-rw-r--r-- | examples/dummyresource/resourcefactory.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 242a772..46e67f3 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp | |||
@@ -109,7 +109,7 @@ class DummySynchronizer : public Sink::Synchronizer { | |||
109 | SinkTrace() << "Sync of " << count << " entities of type " << bufferType << " done." << Sink::Log::TraceTime(time->elapsed()); | 109 | SinkTrace() << "Sync of " << count << " entities of type " << bufferType << " done." << Sink::Log::TraceTime(time->elapsed()); |
110 | } | 110 | } |
111 | 111 | ||
112 | KAsync::Job<void> synchronizeWithSource() Q_DECL_OVERRIDE | 112 | KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &) Q_DECL_OVERRIDE |
113 | { | 113 | { |
114 | SinkLog() << " Synchronizing with the source"; | 114 | SinkLog() << " Synchronizing with the source"; |
115 | return KAsync::syncStart<void>([this]() { | 115 | return KAsync::syncStart<void>([this]() { |
@@ -146,7 +146,7 @@ DummyResource::~DummyResource() | |||
146 | 146 | ||
147 | } | 147 | } |
148 | 148 | ||
149 | KAsync::Job<void> DummyResource::synchronizeWithSource() | 149 | KAsync::Job<void> DummyResource::synchronizeWithSource(const Sink::QueryBase &query) |
150 | { | 150 | { |
151 | SinkTrace() << "Synchronize with source and sending a notification about it"; | 151 | SinkTrace() << "Synchronize with source and sending a notification about it"; |
152 | Sink::Notification n; | 152 | Sink::Notification n; |
@@ -155,7 +155,7 @@ KAsync::Job<void> DummyResource::synchronizeWithSource() | |||
155 | n.message = "We're connected"; | 155 | n.message = "We're connected"; |
156 | n.code = Sink::ApplicationDomain::ConnectedStatus; | 156 | n.code = Sink::ApplicationDomain::ConnectedStatus; |
157 | emit notify(n); | 157 | emit notify(n); |
158 | return GenericResource::synchronizeWithSource(); | 158 | return GenericResource::synchronizeWithSource(query); |
159 | } | 159 | } |
160 | 160 | ||
161 | KAsync::Job<void> DummyResource::inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) | 161 | KAsync::Job<void> DummyResource::inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) |
diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index 46a557e..8ef27a6 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h | |||
@@ -32,7 +32,7 @@ public: | |||
32 | DummyResource(const Sink::ResourceContext &resourceContext, const QSharedPointer<Sink::Pipeline> &pipeline = QSharedPointer<Sink::Pipeline>()); | 32 | DummyResource(const Sink::ResourceContext &resourceContext, const QSharedPointer<Sink::Pipeline> &pipeline = QSharedPointer<Sink::Pipeline>()); |
33 | virtual ~DummyResource(); | 33 | virtual ~DummyResource(); |
34 | 34 | ||
35 | KAsync::Job<void> synchronizeWithSource() Q_DECL_OVERRIDE; | 35 | KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &) Q_DECL_OVERRIDE; |
36 | KAsync::Job<void> inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) Q_DECL_OVERRIDE; | 36 | KAsync::Job<void> inspect(int inspectionType, const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expectedValue) Q_DECL_OVERRIDE; |
37 | }; | 37 | }; |
38 | 38 | ||