summaryrefslogtreecommitdiffstats
path: root/common/resourcefacade.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/resourcefacade.cpp')
-rw-r--r--common/resourcefacade.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/resourcefacade.cpp b/common/resourcefacade.cpp
index 2e4d668..20d9a7c 100644
--- a/common/resourcefacade.cpp
+++ b/common/resourcefacade.cpp
@@ -39,8 +39,9 @@ KAsync::Job<void> ResourceFacade::create(const Akonadi2::ApplicationDomain::Akon
39{ 39{
40 return KAsync::start<void>([resource, this]() { 40 return KAsync::start<void>([resource, this]() {
41 const QByteArray type = resource.getProperty("type").toByteArray(); 41 const QByteArray type = resource.getProperty("type").toByteArray();
42 const QByteArray providedIdentifier = resource.getProperty("identifier").toByteArray();
42 //It is currently a requirement that the resource starts with the type 43 //It is currently a requirement that the resource starts with the type
43 const QByteArray identifier = ResourceConfig::newIdentifier(type); 44 const QByteArray identifier = providedIdentifier.isEmpty() ? ResourceConfig::newIdentifier(type) : providedIdentifier;
44 ResourceConfig::addResource(identifier, type); 45 ResourceConfig::addResource(identifier, type);
45 auto changedProperties = resource.changedProperties(); 46 auto changedProperties = resource.changedProperties();
46 changedProperties.removeOne("identifier"); 47 changedProperties.removeOne("identifier");