summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/store.cpp b/common/store.cpp
index bedbc47..4bf1c58 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -116,7 +116,15 @@ QSharedPointer<QAbstractItemModel> Store::loadModel(Query query)
116template <class DomainType> 116template <class DomainType>
117static std::shared_ptr<StoreFacade<DomainType>> getFacade(const QByteArray &resourceInstanceIdentifier) 117static std::shared_ptr<StoreFacade<DomainType>> getFacade(const QByteArray &resourceInstanceIdentifier)
118{ 118{
119 if (auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceName(resourceInstanceIdentifier), resourceInstanceIdentifier)) { 119
120 const auto type = ApplicationDomain::getTypeName<DomainType>();
121 if (type == "sinkresource" || type == "sinkaccount") {
122 if (auto facade = FacadeFactory::instance().getFacade<DomainType>("", "")) {
123 return facade;
124 }
125 }
126 const auto resourceType = resourceName(resourceInstanceIdentifier);
127 if (auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceType, resourceInstanceIdentifier)) {
120 return facade; 128 return facade;
121 } 129 }
122 return std::make_shared<NullFacade<DomainType>>(); 130 return std::make_shared<NullFacade<DomainType>>();