From e86e1f06d2b730c14c90d4c78719a47f3e5350fc Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 14 Nov 2016 18:04:06 +0100 Subject: Hide Query::parentProperty --- tests/clientapitest.cpp | 8 ++++---- tests/querytest.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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: for (const auto &res : results) { qDebug() << "Parent filter " << query.getFilter("parent").value.toByteArray() << res->identifier() << res->getProperty("parent").toByteArray(); auto parentProperty = res->getProperty("parent").toByteArray(); - if ((!parent && parentProperty.isEmpty()) || (parent && parentProperty == parent->identifier()) || query.parentProperty.isEmpty()) { + if ((!parent && parentProperty.isEmpty()) || (parent && parentProperty == parent->identifier()) || query.parentProperty().isEmpty()) { qDebug() << "Found a hit" << res->identifier(); resultProvider->add(res); } @@ -147,7 +147,7 @@ private slots: // Test Sink::Query query; query.resourceFilter("dummyresource.instance1"); - query.parentProperty = "parent"; + query.requestTree("parent"); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -169,7 +169,7 @@ private slots: // Test Sink::Query query; query.resourceFilter("dummyresource.instance1"); - query.parentProperty = "parent"; + query.requestTree("parent"); auto model = Sink::Store::loadModel(query); QSignalSpy spy(model.data(), SIGNAL(rowsInserted(const QModelIndex &, int, int))); @@ -192,7 +192,7 @@ private slots: Sink::Query query; query.resourceFilter("dummyresource.instance1"); query.setFlags(Sink::Query::LiveQuery); - query.parentProperty = "parent"; + query.requestTree("parent"); auto model = Sink::Store::loadModel(query); 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: // Test Sink::Query query; query.resourceFilter("sink.dummy.instance1"); - query.parentProperty = "parent"; + query.requestTree(); // Ensure all local data is processed VERIFYEXEC(Sink::ResourceControl::flushMessageQueue(QByteArrayList() << "sink.dummy.instance1")); -- cgit v1.2.3