diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-22 18:12:47 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-22 18:12:47 +0100 |
commit | 49f9b61cfdbd108c89db92c400cacdb97985025c (patch) | |
tree | f61d34f4b5a5486cc99b944c8937d8cd21837203 /common/resourcefacade.cpp | |
parent | 1ea79c5916d6d98f4d15defcc238a319f759798b (diff) | |
download | sink-49f9b61cfdbd108c89db92c400cacdb97985025c.tar.gz sink-49f9b61cfdbd108c89db92c400cacdb97985025c.zip |
Don't break the maildirresourcetest
It relies on being able to specify the identifier for the time being.
Diffstat (limited to 'common/resourcefacade.cpp')
-rw-r--r-- | common/resourcefacade.cpp | 3 |
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"); |