diff options
Diffstat (limited to 'tests/clientapitest.cpp')
-rw-r--r-- | tests/clientapitest.cpp | 8 |
1 files changed, 4 insertions, 4 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); |