From 49f9b61cfdbd108c89db92c400cacdb97985025c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 22 Dec 2015 18:12:47 +0100 Subject: Don't break the maildirresourcetest It relies on being able to specify the identifier for the time being. --- common/resourcefacade.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ResourceFacade::create(const Akonadi2::ApplicationDomain::Akon { return KAsync::start([resource, this]() { const QByteArray type = resource.getProperty("type").toByteArray(); + const QByteArray providedIdentifier = resource.getProperty("identifier").toByteArray(); //It is currently a requirement that the resource starts with the type - const QByteArray identifier = ResourceConfig::newIdentifier(type); + const QByteArray identifier = providedIdentifier.isEmpty() ? ResourceConfig::newIdentifier(type) : providedIdentifier; ResourceConfig::addResource(identifier, type); auto changedProperties = resource.changedProperties(); changedProperties.removeOne("identifier"); -- cgit v1.2.3