diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-02 20:21:22 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-02 20:21:22 +0200 |
commit | 381957eeb8b029037bed1a6714b9f801198ffaef (patch) | |
tree | a06cfabc13dd766b023aa02c3df2d697589a70fb /examples | |
parent | 471ba4cfbb161bbae0641fe26360c8218fa31ef1 (diff) | |
download | sink-381957eeb8b029037bed1a6714b9f801198ffaef.tar.gz sink-381957eeb8b029037bed1a6714b9f801198ffaef.zip |
Cleanup
Diffstat (limited to 'examples')
-rw-r--r-- | examples/caldavresource/caldavresource.cpp | 9 | ||||
-rw-r--r-- | examples/carddavresource/carddavresource.cpp | 6 |
2 files changed, 5 insertions, 10 deletions
diff --git a/examples/caldavresource/caldavresource.cpp b/examples/caldavresource/caldavresource.cpp index df9ab52..4a73521 100644 --- a/examples/caldavresource/caldavresource.cpp +++ b/examples/caldavresource/caldavresource.cpp | |||
@@ -64,8 +64,7 @@ protected: | |||
64 | localCalendar.setName(remoteCalendar.displayName()); | 64 | localCalendar.setName(remoteCalendar.displayName()); |
65 | localCalendar.setColor(remoteCalendar.color().name().toLatin1()); | 65 | localCalendar.setColor(remoteCalendar.color().name().toLatin1()); |
66 | 66 | ||
67 | createOrModify(ENTITY_TYPE_CALENDAR, rid, localCalendar, | 67 | createOrModify(ENTITY_TYPE_CALENDAR, rid, localCalendar, {}); |
68 | /* mergeCriteria = */ QHash<QByteArray, Sink::Query::Comparator>{}); | ||
69 | } | 68 | } |
70 | } | 69 | } |
71 | 70 | ||
@@ -86,8 +85,7 @@ protected: | |||
86 | 85 | ||
87 | SinkTrace() << "Found an event with id:" << rid; | 86 | SinkTrace() << "Found an event with id:" << rid; |
88 | 87 | ||
89 | createOrModify(ENTITY_TYPE_EVENT, rid, localEvent, | 88 | createOrModify(ENTITY_TYPE_EVENT, rid, localEvent, {}); |
90 | /* mergeCriteria = */ QHash<QByteArray, Sink::Query::Comparator>{}); | ||
91 | break; | 89 | break; |
92 | } | 90 | } |
93 | case Type::TypeTodo: { | 91 | case Type::TypeTodo: { |
@@ -97,8 +95,7 @@ protected: | |||
97 | 95 | ||
98 | SinkTrace() << "Found a Todo with id:" << rid; | 96 | SinkTrace() << "Found a Todo with id:" << rid; |
99 | 97 | ||
100 | createOrModify(ENTITY_TYPE_TODO, rid, localTodo, | 98 | createOrModify(ENTITY_TYPE_TODO, rid, localTodo, {}); |
101 | /* mergeCriteria = */ QHash<QByteArray, Sink::Query::Comparator>{}); | ||
102 | break; | 99 | break; |
103 | } | 100 | } |
104 | case Type::TypeJournal: | 101 | case Type::TypeJournal: |
diff --git a/examples/carddavresource/carddavresource.cpp b/examples/carddavresource/carddavresource.cpp index 0bf851b..916312f 100644 --- a/examples/carddavresource/carddavresource.cpp +++ b/examples/carddavresource/carddavresource.cpp | |||
@@ -54,12 +54,11 @@ public: | |||
54 | const auto bufferType = ENTITY_TYPE_ADDRESSBOOK; | 54 | const auto bufferType = ENTITY_TYPE_ADDRESSBOOK; |
55 | Sink::ApplicationDomain::Addressbook addressbook; | 55 | Sink::ApplicationDomain::Addressbook addressbook; |
56 | addressbook.setName(addressbookName); | 56 | addressbook.setName(addressbookName); |
57 | QHash<QByteArray, Query::Comparator> mergeCriteria; | ||
58 | 57 | ||
59 | if (!parentAddressbookRid.isEmpty()) { | 58 | if (!parentAddressbookRid.isEmpty()) { |
60 | addressbook.setParent(syncStore().resolveRemoteId(ENTITY_TYPE_ADDRESSBOOK, parentAddressbookRid.toUtf8())); | 59 | addressbook.setParent(syncStore().resolveRemoteId(ENTITY_TYPE_ADDRESSBOOK, parentAddressbookRid.toUtf8())); |
61 | } | 60 | } |
62 | createOrModify(bufferType, remoteId, addressbook, mergeCriteria); | 61 | createOrModify(bufferType, remoteId, addressbook, {}); |
63 | return remoteId; | 62 | return remoteId; |
64 | } | 63 | } |
65 | 64 | ||
@@ -83,8 +82,7 @@ protected: | |||
83 | localContact.setVcard(remoteContact.data()); | 82 | localContact.setVcard(remoteContact.data()); |
84 | localContact.setAddressbook(addressbookLocalId); | 83 | localContact.setAddressbook(addressbookLocalId); |
85 | 84 | ||
86 | QHash<QByteArray, Query::Comparator> mergeCriteria; | 85 | createOrModify(ENTITY_TYPE_CONTACT, resourceID(remoteContact), localContact, {}); |
87 | createOrModify(ENTITY_TYPE_CONTACT, resourceID(remoteContact), localContact, mergeCriteria); | ||
88 | } | 86 | } |
89 | 87 | ||
90 | QByteArray collectionLocalResourceID(const KDAV2::DavCollection &addressbook) Q_DECL_OVERRIDE | 88 | QByteArray collectionLocalResourceID(const KDAV2::DavCollection &addressbook) Q_DECL_OVERRIDE |