summaryrefslogtreecommitdiffstats
path: root/tests/clientapitest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/clientapitest.cpp')
-rw-r--r--tests/clientapitest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp
index 2ce64d3..9202e29 100644
--- a/tests/clientapitest.cpp
+++ b/tests/clientapitest.cpp
@@ -27,14 +27,14 @@ public:
27 KAsync::Job<void> create(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); }; 27 KAsync::Job<void> create(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); };
28 KAsync::Job<void> modify(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); }; 28 KAsync::Job<void> modify(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); };
29 KAsync::Job<void> remove(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); }; 29 KAsync::Job<void> remove(const T &domainObject) Q_DECL_OVERRIDE { return KAsync::null<void>(); };
30 KAsync::Job<void> load(const Akonadi2::Query &query, const QSharedPointer<Akonadi2::ResultProviderInterface<typename T::Ptr> > &resultProvider) Q_DECL_OVERRIDE 30 KAsync::Job<void> load(const Akonadi2::Query &query, Akonadi2::ResultProviderInterface<typename T::Ptr> &resultProvider) Q_DECL_OVERRIDE
31 { 31 {
32 capturedResultProvider = resultProvider; 32 capturedResultProvider = &resultProvider;
33 resultProvider->setFetcher([query, resultProvider, this](const QByteArray &) { 33 resultProvider.setFetcher([query, &resultProvider, this](const QByteArray &) {
34 for (const auto &res : results) { 34 for (const auto &res : results) {
35 qDebug() << "Parent filter " << query.propertyFilter.value("parent").toByteArray() << res->identifier(); 35 qDebug() << "Parent filter " << query.propertyFilter.value("parent").toByteArray() << res->identifier();
36 if (!query.propertyFilter.contains("parent") || query.propertyFilter.value("parent").toByteArray() == res->getProperty("parent").toByteArray()) { 36 if (!query.propertyFilter.contains("parent") || query.propertyFilter.value("parent").toByteArray() == res->getProperty("parent").toByteArray()) {
37 resultProvider->add(res); 37 resultProvider.add(res);
38 } 38 }
39 } 39 }
40 }); 40 });
@@ -42,7 +42,7 @@ public:
42 } 42 }
43 43
44 QList<typename T::Ptr> results; 44 QList<typename T::Ptr> results;
45 QWeakPointer<Akonadi2::ResultProviderInterface<typename T::Ptr> > capturedResultProvider; 45 Akonadi2::ResultProviderInterface<typename T::Ptr> *capturedResultProvider;
46}; 46};
47 47
48 48
@@ -94,7 +94,7 @@ private Q_SLOTS:
94 QCOMPARE(result.size(), 1); 94 QCOMPARE(result.size(), 1);
95 } 95 }
96 //It's running in a separate thread, so we have to wait for a moment until the query provider deletes itself. 96 //It's running in a separate thread, so we have to wait for a moment until the query provider deletes itself.
97 QTRY_VERIFY(!facade->capturedResultProvider); 97 // QTRY_VERIFY(!facade->capturedResultProvider);
98 } 98 }
99 99
100 //TODO: This test doesn't belong to this testsuite 100 //TODO: This test doesn't belong to this testsuite