Changeset View
Changeset View
Standalone View
Standalone View
tests/units/akonadi/akonadilivequeryhelperstest.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
95 | 95 | | |||
96 | // The list which will be filled by the fetch function | 96 | // The list which will be filled by the fetch function | ||
97 | auto collections = Akonadi::Collection::List(); | 97 | auto collections = Akonadi::Collection::List(); | ||
98 | auto add = [&collections] (const Akonadi::Collection &collection) { | 98 | auto add = [&collections] (const Akonadi::Collection &collection) { | ||
99 | collections.append(collection); | 99 | collections.append(collection); | ||
100 | }; | 100 | }; | ||
101 | 101 | | |||
102 | // WHEN | 102 | // WHEN | ||
103 | auto fetch = helpers->fetchAllCollections(); | 103 | auto fetch = helpers->fetchAllCollections(nullptr); | ||
104 | fetch(add); | 104 | fetch(add); | ||
105 | TestHelpers::waitForEmptyJobQueue(); | 105 | TestHelpers::waitForEmptyJobQueue(); | ||
106 | 106 | | |||
107 | auto result = QStringList(); | 107 | auto result = QStringList(); | ||
108 | std::transform(collections.constBegin(), collections.constEnd(), | 108 | std::transform(collections.constBegin(), collections.constEnd(), | ||
109 | std::back_inserter(result), | 109 | std::back_inserter(result), | ||
110 | std::bind(&Akonadi::Collection::displayName, _1)); | 110 | std::bind(&Akonadi::Collection::displayName, _1)); | ||
111 | result.sort(); | 111 | result.sort(); | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 146 | { | |||
167 | // The list which will be filled by the fetch function | 167 | // The list which will be filled by the fetch function | ||
168 | auto collections = Akonadi::Collection::List(); | 168 | auto collections = Akonadi::Collection::List(); | ||
169 | auto add = [&collections] (const Akonadi::Collection &collection) { | 169 | auto add = [&collections] (const Akonadi::Collection &collection) { | ||
170 | collections.append(collection); | 170 | collections.append(collection); | ||
171 | }; | 171 | }; | ||
172 | 172 | | |||
173 | // WHEN | 173 | // WHEN | ||
174 | QFETCH(Akonadi::Collection, root); | 174 | QFETCH(Akonadi::Collection, root); | ||
175 | auto fetch = helpers->fetchCollections(root); | 175 | auto fetch = helpers->fetchCollections(root, nullptr); | ||
176 | fetch(add); | 176 | fetch(add); | ||
177 | TestHelpers::waitForEmptyJobQueue(); | 177 | TestHelpers::waitForEmptyJobQueue(); | ||
178 | 178 | | |||
179 | auto result = QStringList(); | 179 | auto result = QStringList(); | ||
180 | std::transform(collections.constBegin(), collections.constEnd(), | 180 | std::transform(collections.constBegin(), collections.constEnd(), | ||
181 | std::back_inserter(result), | 181 | std::back_inserter(result), | ||
182 | std::bind(&Akonadi::Collection::displayName, _1)); | 182 | std::bind(&Akonadi::Collection::displayName, _1)); | ||
183 | result.sort(); | 183 | result.sort(); | ||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |