data/DavSelectionList.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | #include <QStringList> | ||
| 3 | #include <QVariant> | ||
| 4 | |||
| 5 | // F100-08: QSettings stores a list with one empty entry (or an empty string) | ||
| 6 | // as "key=" and reads it back as [""]. An empty collection path then became | ||
| 7 | // an address book named "Address book" that never syncs. Every read of a | ||
| 8 | // DAV selection list (selectedBooks, selectedCalendars, readOnlyCalendars) | ||
| 9 | // goes through this and drops blank entries. | ||
| 10 | 12348 | inline QStringList davPathList(const QVariant &value) { | |
| 11 | 12348 | QStringList paths = value.toStringList(); | |
| 12 |
2/2✓ Branch 2 → 3 taken 8775 times.
✓ Branch 3 → 4 taken 12348 times.
|
21123 | paths.removeIf([](const QString &path) { return path.trimmed().isEmpty(); }); |
| 13 | 12348 | return paths; | |
| 14 | ✗ | } | |
| 15 |