diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clientapitest.cpp | 8 | ||||
-rw-r--r-- | tests/querytest.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index 3f500b7..ae9286c 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp | |||
@@ -65,7 +65,7 @@ public: | |||
65 | for (const auto &res : results) { | 65 | for (const auto &res : results) { |
66 | qDebug() << "Parent filter " << query.getFilter("parent").value.toByteArray() << res->identifier() << res->getProperty("parent").toByteArray(); | 66 | qDebug() << "Parent filter " << query.getFilter("parent").value.toByteArray() << res->identifier() << res->getProperty("parent").toByteArray(); |
67 | auto parentProperty = res->getProperty("parent").toByteArray(); | 67 | auto parentProperty = res->getProperty("parent").toByteArray(); |
68 | if ((!parent && parentProperty.isEmpty()) || (parent && parentProperty == parent->identifier()) || query.parentProperty.isEmpty()) { | 68 | if ((!parent && parentProperty.isEmpty()) || (parent && parentProperty == parent->identifier()) || query.parentProperty().isEmpty()) { |
69 | qDebug() << "Found a hit" << res->identifier(); | 69 | qDebug() << "Found a hit" << res->identifier(); |
70 | resultProvider->add(res); | 70 | resultProvider->add(res); |
71 | } | 71 | } |
@@ -147,7 +147,7 @@ private slots: | |||
147 | // Test | 147 | // Test |
148 | Sink::Query query; | 148 | Sink::Query query; |
149 | query.resourceFilter("dummyresource.instance1"); | 149 | query.resourceFilter("dummyresource.instance1"); |
150 | query.parentProperty = "parent"; | 150 | query.requestTree("parent"); |
151 | 151 | ||
152 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); | 152 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); |
153 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); | 153 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); |
@@ -169,7 +169,7 @@ private slots: | |||
169 | // Test | 169 | // Test |
170 | Sink::Query query; | 170 | Sink::Query query; |
171 | query.resourceFilter("dummyresource.instance1"); | 171 | query.resourceFilter("dummyresource.instance1"); |
172 | query.parentProperty = "parent"; | 172 | query.requestTree("parent"); |
173 | 173 | ||
174 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); | 174 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); |
175 | QSignalSpy spy(model.data(), SIGNAL(rowsInserted(const QModelIndex &, int, int))); | 175 | QSignalSpy spy(model.data(), SIGNAL(rowsInserted(const QModelIndex &, int, int))); |
@@ -192,7 +192,7 @@ private slots: | |||
192 | Sink::Query query; | 192 | Sink::Query query; |
193 | query.resourceFilter("dummyresource.instance1"); | 193 | query.resourceFilter("dummyresource.instance1"); |
194 | query.setFlags(Sink::Query::LiveQuery); | 194 | query.setFlags(Sink::Query::LiveQuery); |
195 | query.parentProperty = "parent"; | 195 | query.requestTree("parent"); |
196 | 196 | ||
197 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); | 197 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); |
198 | QTRY_COMPARE(model->rowCount(), 1); | 198 | QTRY_COMPARE(model->rowCount(), 1); |
diff --git a/tests/querytest.cpp b/tests/querytest.cpp index d823304..2eb1239 100644 --- a/tests/querytest.cpp +++ b/tests/querytest.cpp | |||
@@ -252,7 +252,7 @@ private slots: | |||
252 | // Test | 252 | // Test |
253 | Sink::Query query; | 253 | Sink::Query query; |
254 | query.resourceFilter("sink.dummy.instance1"); | 254 | query.resourceFilter("sink.dummy.instance1"); |
255 | query.parentProperty = "parent"; | 255 | query.requestTree<Folder::Parent>(); |
256 | 256 | ||
257 | // Ensure all local data is processed | 257 | // Ensure all local data is processed |
258 | VERIFYEXEC(Sink::ResourceControl::flushMessageQueue(QByteArrayList() << "sink.dummy.instance1")); | 258 | VERIFYEXEC(Sink::ResourceControl::flushMessageQueue(QByteArrayList() << "sink.dummy.instance1")); |