From 18e6abad3669c2c0ef55922543b4033b031893ff Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 20 Dec 2016 16:41:15 +0100 Subject: Store is not defined. --- sinksh/sinksh_utils.cpp | 2 +- sinksh/sinksh_utils.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/sinksh/sinksh_utils.cpp b/sinksh/sinksh_utils.cpp index 1ee5997..82bd6c1 100644 --- a/sinksh/sinksh_utils.cpp +++ b/sinksh/sinksh_utils.cpp @@ -58,7 +58,7 @@ StoreBase &getStore(const QString &type) SinkWarning_("", "") << "Trying to get a store that doesn't exist: " << type; Q_ASSERT(false); - static Store store; + static DummyStore store; return store; } diff --git a/sinksh/sinksh_utils.h b/sinksh/sinksh_utils.h index 0a47661..051c616 100644 --- a/sinksh/sinksh_utils.h +++ b/sinksh/sinksh_utils.h @@ -59,6 +59,45 @@ public: virtual QList read(const Sink::Query &query) = 0; }; +class DummyStore : public StoreBase +{ +public: + Sink::ApplicationDomain::ApplicationDomainType::Ptr getObject() Q_DECL_OVERRIDE + { + return {}; + } + + Sink::ApplicationDomain::ApplicationDomainType::Ptr getObject(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier = QByteArray()) Q_DECL_OVERRIDE + { + return {}; + } + + KAsync::Job create(const Sink::ApplicationDomain::ApplicationDomainType &type) Q_DECL_OVERRIDE + { + return KAsync::null(); + } + + KAsync::Job modify(const Sink::ApplicationDomain::ApplicationDomainType &type) Q_DECL_OVERRIDE + { + return KAsync::null(); + } + + KAsync::Job remove(const Sink::ApplicationDomain::ApplicationDomainType &type) Q_DECL_OVERRIDE + { + return KAsync::null(); + } + + QSharedPointer loadModel(const Sink::Query &query) Q_DECL_OVERRIDE + { + return {}; + } + + QList read(const Sink::Query &query) Q_DECL_OVERRIDE + { + return {}; + } +}; + template class Store : public StoreBase { -- cgit v1.2.3