From 3e7b8fe8b8cca75b546c8cac2c09ce231861f21b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 28 Nov 2016 23:04:59 +0100 Subject: Used the CommandProcessor as central place for all command processing. --- examples/dummyresource/resourcefactory.cpp | 19 +++++++------------ examples/dummyresource/resourcefactory.h | 2 -- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'examples') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 8e81c79..3565d57 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -113,6 +113,13 @@ class DummySynchronizer : public Sink::Synchronizer { KAsync::Job synchronizeWithSource(const Sink::QueryBase &) Q_DECL_OVERRIDE { SinkLog() << " Synchronizing with the source"; + SinkTrace() << "Synchronize with source and sending a notification about it"; + Sink::Notification n; + n.id = "connected"; + n.type = Sink::Notification::Status; + n.message = "We're connected"; + n.code = Sink::ApplicationDomain::ConnectedStatus; + emit notify(n); return KAsync::syncStart([this]() { synchronize(ENTITY_TYPE_EVENT, DummyStore::instance().events(), [this](const QByteArray &ridBuffer, const QMap &data) { return createEvent(ridBuffer, data); @@ -174,18 +181,6 @@ DummyResource::~DummyResource() } -KAsync::Job DummyResource::synchronizeWithSource(const Sink::QueryBase &query) -{ - SinkTrace() << "Synchronize with source and sending a notification about it"; - Sink::Notification n; - n.id = "connected"; - n.type = Sink::Notification::Status; - n.message = "We're connected"; - n.code = Sink::ApplicationDomain::ConnectedStatus; - emit notify(n); - return GenericResource::synchronizeWithSource(query); -} - DummyResourceFactory::DummyResourceFactory(QObject *parent) : Sink::ResourceFactory(parent) { diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index 2eb7558..bc35d82 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h @@ -31,8 +31,6 @@ class DummyResource : public Sink::GenericResource public: DummyResource(const Sink::ResourceContext &resourceContext, const QSharedPointer &pipeline = QSharedPointer()); virtual ~DummyResource(); - - KAsync::Job synchronizeWithSource(const Sink::QueryBase &) Q_DECL_OVERRIDE; }; class DummyResourceFactory : public Sink::ResourceFactory -- cgit v1.2.3