diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 14:58:58 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 14:58:58 +0200 |
| commit | 3303c7855cb22a6bb4f36aa1a17707187320f5d2 (patch) | |
| tree | 6a2328cffaab820c8247f267785cc2782d77e154 /tests/CMakeLists.txt | |
| parent | 7d4654536de5be4bd3555eb4b81a2e07c1d4148d (diff) | |
| download | qtmaildir-3303c7855cb22a6bb4f36aa1a17707187320f5d2.tar.gz qtmaildir-3303c7855cb22a6bb4f36aa1a17707187320f5d2.zip | |
feat: add ContactStore, the vCard address-book parse
Reads a vdirsyncer contacts directory of vCard 3.0 files into a
QList<Contact> for the completion work that follows. Pure over values,
no widget and no QCompleter, so the parse is testable without a window.
unfold() joins folded lines before any field is looked at; parseCard()
splits property from value on the first colon outside a quoted
parameter, unescapes FN, and yields one contact per EMAIL line;
loadDirectory() walks recursively, skips unreadable or addressless
cards, de-duplicates on the address case-insensitively, and sorts by
name then address. N, PHOTO, ADR and TEL are deliberately not used.
23 new tests. No user-facing strings, so no tr() change.
Diffstat (limited to 'tests/CMakeLists.txt')
| -rw-r--r-- | tests/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 24da10b..6cc92ab 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -69,6 +69,9 @@ add_qtmaildir_test(tagdialog) add_qtmaildir_test(tagrules) add_qtmaildir_test(rulequery) add_qtmaildir_test(searchterm) +add_qtmaildir_test(contactstore) +target_compile_definitions(test_contactstore PRIVATE + FIXTURE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/fixtures") add_qtmaildir_test(signatures) add_qtmaildir_test(busyindicator) add_qtmaildir_test(tagstrip) |
