Changeset View
Changeset View
Standalone View
Standalone View
src/server/preprocessormanager.cpp
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include "preprocessormanager.h" | 25 | #include "preprocessormanager.h" | ||
26 | #include "akonadiserver_debug.h" | 26 | #include "akonadiserver_debug.h" | ||
27 | 27 | | |||
28 | #include "entities.h" // Akonadi::Server::PimItem | 28 | #include "entities.h" // Akonadi::Server::PimItem | ||
29 | #include "storage/datastore.h" | 29 | #include "storage/datastore.h" | ||
30 | #include "tracer.h" | 30 | #include "tracer.h" | ||
31 | 31 | | |||
32 | #include "collectionreferencemanager.h" | | |||
33 | | ||||
34 | #include "preprocessormanageradaptor.h" | 32 | #include "preprocessormanageradaptor.h" | ||
35 | 33 | | |||
36 | namespace Akonadi | 34 | namespace Akonadi | ||
37 | { | 35 | { | ||
38 | namespace Server | 36 | namespace Server | ||
39 | { | 37 | { | ||
40 | 38 | | |||
41 | const int gHeartbeatTimeoutInMSecs = 30000; // 30 sec heartbeat | 39 | const int gHeartbeatTimeoutInMSecs = 30000; // 30 sec heartbeat | ||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | 213 | if (!mEnabled) { | |||
225 | return; | 223 | return; | ||
226 | } | 224 | } | ||
227 | 225 | | |||
228 | #if 0 | 226 | #if 0 | ||
229 | // Now the hidden flag is stored as a part.. too hard to assert its existence :D | 227 | // Now the hidden flag is stored as a part.. too hard to assert its existence :D | ||
230 | Q_ASSERT_X(item.hidden(), "PreprocessorManager::beginHandleItem()", "The item you pass to this function should be hidden!"); | 228 | Q_ASSERT_X(item.hidden(), "PreprocessorManager::beginHandleItem()", "The item you pass to this function should be hidden!"); | ||
231 | #endif | 229 | #endif | ||
232 | 230 | | |||
233 | if (mPreprocessorChain.isEmpty() || CollectionReferenceManager::instance()->isReferenced(item.collectionId())) { | 231 | if (mPreprocessorChain.isEmpty()) { | ||
234 | // No preprocessors at all or referenced collection: immediately end handling the item. | 232 | // No preprocessors at all: immediately end handling the item. | ||
235 | lockedEndHandleItem(item.id()); | 233 | lockedEndHandleItem(item.id()); | ||
236 | return; | 234 | return; | ||
237 | } | 235 | } | ||
238 | 236 | | |||
239 | if (dataStore->inTransaction()) { | 237 | if (dataStore->inTransaction()) { | ||
240 | qCDebug(AKONADISERVER_LOG) << "PreprocessorManager::beginHandleItem(" << item.id() << "): the DataStore is in transaction, pushing item to a wait queue"; | 238 | qCDebug(AKONADISERVER_LOG) << "PreprocessorManager::beginHandleItem(" << item.id() << "): the DataStore is in transaction, pushing item to a wait queue"; | ||
241 | 239 | | |||
242 | // The calling thread data store is in a transaction: push the item into a wait queue | 240 | // The calling thread data store is in a transaction: push the item into a wait queue | ||
▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines |