diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/typeimplementations.cpp | 7 | ||||
-rw-r--r-- | common/log.cpp | 16 | ||||
-rw-r--r-- | common/storage/entitystore.cpp | 2 |
3 files changed, 18 insertions, 7 deletions
diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp index c74701d..6e14501 100644 --- a/common/domain/typeimplementations.cpp +++ b/common/domain/typeimplementations.cpp | |||
@@ -56,7 +56,8 @@ typedef IndexConfig<Folder, | |||
56 | > FolderIndexConfig; | 56 | > FolderIndexConfig; |
57 | 57 | ||
58 | typedef IndexConfig<Contact, | 58 | typedef IndexConfig<Contact, |
59 | ValueIndex<Contact::Uid> | 59 | ValueIndex<Contact::Uid>, |
60 | ValueIndex<Contact::Addressbook> | ||
60 | > ContactIndexConfig; | 61 | > ContactIndexConfig; |
61 | 62 | ||
62 | typedef IndexConfig<Addressbook, | 63 | typedef IndexConfig<Addressbook, |
@@ -65,12 +66,14 @@ typedef IndexConfig<Addressbook, | |||
65 | 66 | ||
66 | typedef IndexConfig<Event, | 67 | typedef IndexConfig<Event, |
67 | ValueIndex<Event::Uid>, | 68 | ValueIndex<Event::Uid>, |
69 | ValueIndex<Event::Calendar>, | ||
68 | SortedIndex<Event::StartTime>, | 70 | SortedIndex<Event::StartTime>, |
69 | SampledPeriodIndex<Event::StartTime, Event::EndTime> | 71 | SampledPeriodIndex<Event::StartTime, Event::EndTime> |
70 | > EventIndexConfig; | 72 | > EventIndexConfig; |
71 | 73 | ||
72 | typedef IndexConfig<Todo, | 74 | typedef IndexConfig<Todo, |
73 | ValueIndex<Todo::Uid> | 75 | ValueIndex<Todo::Uid>, |
76 | ValueIndex<Todo::Calendar> | ||
74 | > TodoIndexConfig; | 77 | > TodoIndexConfig; |
75 | 78 | ||
76 | typedef IndexConfig<Calendar, | 79 | typedef IndexConfig<Calendar, |
diff --git a/common/log.cpp b/common/log.cpp index 5156a23..e5ed29b 100644 --- a/common/log.cpp +++ b/common/log.cpp | |||
@@ -253,14 +253,22 @@ class DebugAreaCollector { | |||
253 | public: | 253 | public: |
254 | DebugAreaCollector() | 254 | DebugAreaCollector() |
255 | { | 255 | { |
256 | QMutexLocker locker(&mutex); | 256 | //This call can potentially print a log message (if we fail to remove the qsettings lockfile), which would result in a deadlock if we locked over all of it. |
257 | mDebugAreas = debugAreasConfig()->value("areas").value<QString>().split(';').toSet(); | 257 | const auto areas = debugAreasConfig()->value("areas").value<QString>().split(';').toSet(); |
258 | { | ||
259 | QMutexLocker locker(&mutex); | ||
260 | mDebugAreas = areas; | ||
261 | } | ||
258 | } | 262 | } |
259 | 263 | ||
260 | ~DebugAreaCollector() | 264 | ~DebugAreaCollector() |
261 | { | 265 | { |
262 | QMutexLocker locker(&mutex); | 266 | //This call can potentially print a log message (if we fail to remove the qsettings lockfile), which would result in a deadlock if we locked over all of it. |
263 | mDebugAreas += debugAreasConfig()->value("areas").value<QString>().split(';').toSet(); | 267 | const auto areas = debugAreasConfig()->value("areas").value<QString>().split(';').toSet(); |
268 | { | ||
269 | QMutexLocker locker(&mutex); | ||
270 | mDebugAreas += areas; | ||
271 | } | ||
264 | debugAreasConfig()->setValue("areas", QVariant::fromValue(mDebugAreas.toList().join(';'))); | 272 | debugAreasConfig()->setValue("areas", QVariant::fromValue(mDebugAreas.toList().join(';'))); |
265 | } | 273 | } |
266 | 274 | ||
diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index c11f49c..daabf1f 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp | |||
@@ -458,7 +458,7 @@ QVector<Identifier> EntityStore::fullScan(const QByteArray &type) | |||
458 | const auto identifier = Sink::Storage::Identifier::fromDisplayByteArray(uid); | 458 | const auto identifier = Sink::Storage::Identifier::fromDisplayByteArray(uid); |
459 | if (keys.contains(identifier)) { | 459 | if (keys.contains(identifier)) { |
460 | //Not something that should persist if the replay works, so we keep a message for now. | 460 | //Not something that should persist if the replay works, so we keep a message for now. |
461 | SinkTraceCtx(d->logCtx) << "Multiple revisions for key: " << key; | 461 | SinkTraceCtx(d->logCtx) << "Multiple revisions for uid: " << Sink::Storage::Key::fromInternalByteArray(key) << ". This is normal if changereplay has not completed yet."; |
462 | } | 462 | } |
463 | keys << identifier; | 463 | keys << identifier; |
464 | return true; | 464 | return true; |