Changeset View
Changeset View
Standalone View
Standalone View
agents/unifiedmailboxagent/unifiedmailboxagent.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 58 | { | |||
---|---|---|---|---|---|
60 | 60 | | |||
61 | new UnifiedMailboxAgentAdaptor(this); | 61 | new UnifiedMailboxAgentAdaptor(this); | ||
62 | KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/UnifiedMailboxAgent"), this, QDBusConnection::ExportAdaptors); | 62 | KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/UnifiedMailboxAgent"), this, QDBusConnection::ExportAdaptors); | ||
63 | const auto service = Akonadi::ServerManager::agentServiceName(Akonadi::ServerManager::Resource, identifier()); | 63 | const auto service = Akonadi::ServerManager::agentServiceName(Akonadi::ServerManager::Resource, identifier()); | ||
64 | KDBusConnectionPool::threadConnection().registerService(service); | 64 | KDBusConnectionPool::threadConnection().registerService(service); | ||
65 | 65 | | |||
66 | connect(&mBoxManager, &UnifiedMailboxManager::updateBox, | 66 | connect(&mBoxManager, &UnifiedMailboxManager::updateBox, | ||
67 | this, [this](const UnifiedMailbox *box) { | 67 | this, [this](const UnifiedMailbox *box) { | ||
68 | if (!box->collectionId()) { | 68 | if (box->collectionId() <= -1) { | ||
69 | qCWarning(UNIFIEDMAILBOXAGENT_LOG) << "MailboxManager wants us to update Box but does not have its CollectionId!?"; | 69 | qCWarning(UNIFIEDMAILBOXAGENT_LOG) << "MailboxManager wants us to update Box but does not have its CollectionId!?"; | ||
70 | return; | 70 | return; | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | // Schedule collection sync for the box | 73 | // Schedule collection sync for the box | ||
74 | synchronizeCollection(box->collectionId().value()); | 74 | synchronizeCollection(box->collectionId()); | ||
75 | }); | 75 | }); | ||
76 | 76 | | |||
77 | auto &ifs = changeRecorder()->itemFetchScope(); | 77 | auto &ifs = changeRecorder()->itemFetchScope(); | ||
78 | ifs.setAncestorRetrieval(Akonadi::ItemFetchScope::None); | 78 | ifs.setAncestorRetrieval(Akonadi::ItemFetchScope::None); | ||
79 | ifs.setCacheOnly(true); | 79 | ifs.setCacheOnly(true); | ||
80 | ifs.fetchFullPayload(false); | 80 | ifs.fetchFullPayload(false); | ||
81 | 81 | | |||
82 | if (Settings::self()->enabled()) { | 82 | if (Settings::self()->enabled()) { | ||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |