Commit e9310258 authored by Shashwat Jolly's avatar Shashwat Jolly
Browse files

Fix prevUid updation while setting up items

parent 319371f2
...@@ -53,12 +53,14 @@ void CalendarTaskBaseHandler::getItemListFromEntries(std::vector<EteSyncEntryPtr ...@@ -53,12 +53,14 @@ void CalendarTaskBaseHandler::getItemListFromEntries(std::vector<EteSyncEntryPtr
for (auto &entry : entries) { for (auto &entry : entries) {
if (!entry) { if (!entry) {
qCDebug(ETESYNC_LOG) << "SetupItems: Entry is null"; qCDebug(ETESYNC_LOG) << "SetupItems: Entry is null";
prevUid = QStringFromCharPtr(CharPtr(etesync_entry_get_uid(entry.get())));
continue; continue;
} }
EteSyncSyncEntryPtr syncEntry = etesync_entry_get_sync_entry(entry.get(), cryptoManager.get(), prevUid); EteSyncSyncEntryPtr syncEntry = etesync_entry_get_sync_entry(entry.get(), cryptoManager.get(), prevUid);
if (!syncEntry) { if (!syncEntry) {
qCDebug(ETESYNC_LOG) << "SetupItems: syncEntry is null for entry" << etesync_entry_get_uid(entry.get()); qCDebug(ETESYNC_LOG) << "SetupItems: syncEntry is null for entry" << etesync_entry_get_uid(entry.get());
prevUid = QStringFromCharPtr(CharPtr(etesync_entry_get_uid(entry.get())));
continue; continue;
} }
...@@ -69,6 +71,7 @@ void CalendarTaskBaseHandler::getItemListFromEntries(std::vector<EteSyncEntryPtr ...@@ -69,6 +71,7 @@ void CalendarTaskBaseHandler::getItemListFromEntries(std::vector<EteSyncEntryPtr
if (!incidence || (incidence->uid()).isEmpty()) { if (!incidence || (incidence->uid()).isEmpty()) {
qCDebug(ETESYNC_LOG) << "Couldn't parse entry with uid" << etesync_entry_get_uid(entry.get()); qCDebug(ETESYNC_LOG) << "Couldn't parse entry with uid" << etesync_entry_get_uid(entry.get());
prevUid = QStringFromCharPtr(CharPtr(etesync_entry_get_uid(entry.get())));
continue; continue;
} }
......
...@@ -264,6 +264,7 @@ BaseHandler *EteSyncResource::fetchHandlerForCollection(const Akonadi::Collectio ...@@ -264,6 +264,7 @@ BaseHandler *EteSyncResource::fetchHandlerForCollection(const Akonadi::Collectio
void EteSyncResource::retrieveItems(const Akonadi::Collection &collection) void EteSyncResource::retrieveItems(const Akonadi::Collection &collection)
{ {
qCDebug(ETESYNC_LOG) << "Retrieving entries for journal" << collection.remoteId();
const int timeSinceLastCacheUpdate = mJournalsCacheUpdateTime.secsTo(QDateTime::currentDateTime()); const int timeSinceLastCacheUpdate = mJournalsCacheUpdateTime.secsTo(QDateTime::currentDateTime());
if (timeSinceLastCacheUpdate <= 30) { if (timeSinceLastCacheUpdate <= 30) {
const QString journalUid = collection.remoteId(); const QString journalUid = collection.remoteId();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment