From 660ee77c9875ad71d4189e8643f679f574687528 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 10 Feb 2016 08:51:25 +0100 Subject: Renamed Resources to ResourceControl --- common/clientapi.cpp | 12 +++---- common/clientapi.h | 26 +++++++------- common/inspection.h | 2 +- examples/maildirresource/maildirresource.cpp | 4 +-- tests/dummyresourcebenchmark.cpp | 4 +-- tests/dummyresourcetest.cpp | 16 ++++----- tests/inspectiontest.cpp | 4 +-- tests/maildirresourcetest.cpp | 54 ++++++++++++++-------------- tests/modelinteractivitytest.cpp | 2 +- tests/querytest.cpp | 12 +++---- 10 files changed, 68 insertions(+), 68 deletions(-) diff --git a/common/clientapi.cpp b/common/clientapi.cpp index f67606e..cbbfdd8 100644 --- a/common/clientapi.cpp +++ b/common/clientapi.cpp @@ -155,7 +155,7 @@ KAsync::Job Store::remove(const DomainType &domainObject) }); } -KAsync::Job Resources::shutdown(const QByteArray &identifier) +KAsync::Job ResourceControl::shutdown(const QByteArray &identifier) { Trace() << "shutdown " << identifier; auto time = QSharedPointer::create(); @@ -178,7 +178,7 @@ KAsync::Job Resources::shutdown(const QByteArray &identifier) .template then([](){}); } -KAsync::Job Resources::start(const QByteArray &identifier) +KAsync::Job ResourceControl::start(const QByteArray &identifier) { Trace() << "start " << identifier; auto time = QSharedPointer::create(); @@ -221,7 +221,7 @@ KAsync::Job Store::synchronize(const Sink::Query &query) .template then([](){}); } -KAsync::Job Resources::flushMessageQueue(const QByteArrayList &resourceIdentifier) +KAsync::Job ResourceControl::flushMessageQueue(const QByteArrayList &resourceIdentifier) { Trace() << "flushMessageQueue" << resourceIdentifier; return KAsync::iterate(resourceIdentifier) @@ -237,7 +237,7 @@ KAsync::Job Resources::flushMessageQueue(const QByteArrayList &resourceIde .template then([](){}); } -KAsync::Job Resources::flushReplayQueue(const QByteArrayList &resourceIdentifier) +KAsync::Job ResourceControl::flushReplayQueue(const QByteArrayList &resourceIdentifier) { return flushMessageQueue(resourceIdentifier); } @@ -304,7 +304,7 @@ KAsync::Job > Store::fetch(const Sink::Query &qu } template -KAsync::Job Resources::inspect(const Inspection &inspectionCommand) +KAsync::Job ResourceControl::inspect(const Inspection &inspectionCommand) { auto resource = inspectionCommand.resourceIdentifier; @@ -375,7 +375,7 @@ void Notifier::registerHandler(std::function handler template KAsync::Job Store::create(const T &domainObject); \ template KAsync::Job Store::modify(const T &domainObject); \ template QSharedPointer Store::loadModel(Query query); \ - template KAsync::Job Resources::inspect(const Inspection &); \ + template KAsync::Job ResourceControl::inspect(const Inspection &); \ template KAsync::Job Store::fetchOne(const Query &); \ template KAsync::Job > Store::fetchAll(const Query &); \ template KAsync::Job > Store::fetch(const Query &, int); \ diff --git a/common/clientapi.h b/common/clientapi.h index fb44ca2..2b49826 100644 --- a/common/clientapi.h +++ b/common/clientapi.h @@ -111,33 +111,33 @@ KAsync::Job > SINK_EXPORT fetch(const Sink::Quer }; -namespace Resources { +namespace ResourceControl { template KAsync::Job SINK_EXPORT inspect(const Inspection &inspectionCommand); /** - * Shutdown resource. - */ + * Shutdown resource. + */ KAsync::Job SINK_EXPORT shutdown(const QByteArray &resourceIdentifier); /** - * Start resource. - * - * The resource is ready for operation once this command completes. - * This command is only necessary if a resource was shutdown previously, - * otherwise the resource process will automatically start as necessary. - */ + * Start resource. + * + * The resource is ready for operation once this command completes. + * This command is only necessary if a resource was shutdown previously, + * otherwise the resource process will automatically start as necessary. + */ KAsync::Job SINK_EXPORT start(const QByteArray &resourceIdentifier); /** - * Flushes any pending messages to disk - */ + * Flushes any pending messages to disk + */ KAsync::Job SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); /** - * Flushes any pending messages that haven't been replayed to the source. - */ + * Flushes any pending messages that haven't been replayed to the source. + */ KAsync::Job SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); } diff --git a/common/inspection.h b/common/inspection.h index b9f6bf3..d85eab6 100644 --- a/common/inspection.h +++ b/common/inspection.h @@ -24,7 +24,7 @@ #include "applicationdomaintype.h" namespace Sink { - namespace Resources { + namespace ResourceControl { struct Inspection { static Inspection PropertyInspection(const Sink::ApplicationDomain::Entity &entity, const QByteArray &property, const QVariant &expectedValue) diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index 6fd70a0..4648717 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp @@ -338,7 +338,7 @@ KAsync::Job MaildirResource::inspect(int inspectionType, const QByteArray auto synchronizationTransaction = synchronizationStore->createTransaction(Sink::Storage::ReadOnly); Trace() << "Inspecting " << inspectionType << domainType << entityId << property << expectedValue; if (domainType == ENTITY_TYPE_MAIL) { - if (inspectionType == Sink::Resources::Inspection::PropertyInspectionType) { + if (inspectionType == Sink::ResourceControl::Inspection::PropertyInspectionType) { if (property == "unread") { const auto remoteId = resolveLocalId(ENTITY_TYPE_MAIL, entityId, synchronizationTransaction); const auto flags = KPIM::Maildir::readEntryFlags(remoteId.split('/').last()); @@ -363,7 +363,7 @@ KAsync::Job MaildirResource::inspect(int inspectionType, const QByteArray return KAsync::null(); } } - if (inspectionType == Sink::Resources::Inspection::ExistenceInspectionType) { + if (inspectionType == Sink::ResourceControl::Inspection::ExistenceInspectionType) { const auto remoteId = resolveLocalId(ENTITY_TYPE_MAIL, entityId, synchronizationTransaction); if (QFileInfo(remoteId).exists() != expectedValue.toBool()) { return KAsync::error(1, "Wrong file existence: " + remoteId); diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index 6170f49..60ebe74 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp @@ -102,7 +102,7 @@ private Q_SLOTS: QTRY_VERIFY(gotNotification); QVERIFY2(duration < 100, QString::fromLatin1("Processing a create command took more than 100ms: %1").arg(duration).toLatin1()); - Sink::Resources::shutdown("org.kde.dummy.instance1").exec().waitForFinished(); + Sink::ResourceControl::shutdown("org.kde.dummy.instance1").exec().waitForFinished(); qDebug() << "Single command took [ms]: " << duration; } @@ -127,7 +127,7 @@ private Q_SLOTS: { Sink::Query query; query.resources << "org.kde.dummy.instance1"; - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); } auto allProcessedTime = time.elapsed(); diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index e74fe25..1253e6c 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp @@ -65,7 +65,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); query.propertyFilter.insert("uid", "testuid"); auto model = Sink::Store::loadModel(query); @@ -89,7 +89,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); query.propertyFilter.insert("uid", "testuid"); @@ -117,7 +117,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); query.propertyFilter.insert("summary", "summaryValue2"); @@ -151,7 +151,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->rowCount(QModelIndex()) >= 1); @@ -168,7 +168,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->rowCount(QModelIndex()) >= 1); @@ -191,7 +191,7 @@ private Q_SLOTS: query.propertyFilter.insert("uid", "testuid"); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //Test create Sink::ApplicationDomain::Event event2; @@ -210,7 +210,7 @@ private Q_SLOTS: Sink::Store::modify(event2).exec().waitForFinished(); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //Test modify { @@ -225,7 +225,7 @@ private Q_SLOTS: Sink::Store::remove(event2).exec().waitForFinished(); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //Test remove { diff --git a/tests/inspectiontest.cpp b/tests/inspectiontest.cpp index 70806fa..0323225 100644 --- a/tests/inspectiontest.cpp +++ b/tests/inspectiontest.cpp @@ -41,8 +41,8 @@ private Q_SLOTS: Mail mail(QByteArray("org.kde.dummy.instance1"), QByteArray("identifier"), 0, QSharedPointer::create()); //testInspection is a magic property that the dummyresource supports - auto inspectionCommand = Resources::Inspection::PropertyInspection(mail, "testInspection", success); - auto result = Resources::inspect(inspectionCommand).exec(); + auto inspectionCommand = ResourceControl::Inspection::PropertyInspection(mail, "testInspection", success); + auto result = ResourceControl::inspect(inspectionCommand).exec(); result.waitForFinished(); if (success) { QVERIFY(!result.errorCode()); diff --git a/tests/maildirresourcetest.cpp b/tests/maildirresourcetest.cpp index c5c9348..176ab9f 100644 --- a/tests/maildirresourcetest.cpp +++ b/tests/maildirresourcetest.cpp @@ -68,7 +68,7 @@ private Q_SLOTS: void cleanup() { - Sink::Resources::shutdown(QByteArray("org.kde.maildir.instance1")).exec().waitForFinished(); + Sink::ResourceControl::shutdown(QByteArray("org.kde.maildir.instance1")).exec().waitForFinished(); MaildirResource::removeFromDisk("org.kde.maildir.instance1"); QDir dir(targetPath); dir.removeRecursively(); @@ -80,7 +80,7 @@ private Q_SLOTS: qDebug() << "-----------------------------------------"; qDebug(); copyRecursively(TESTDATAPATH "/maildir1", targetPath); - Sink::Resources::start(QByteArray("org.kde.maildir.instance1")).exec().waitForFinished(); + Sink::ResourceControl::start(QByteArray("org.kde.maildir.instance1")).exec().waitForFinished(); } void testListFolders() @@ -90,7 +90,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -105,7 +105,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -123,7 +123,7 @@ private Q_SLOTS: //Ensure all local data is processed auto query = Query::ResourceFilter("org.kde.maildir.instance1"); Store::synchronize(query).exec().waitForFinished(); - Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto result = Store::fetchOne( Query::ResourceFilter("org.kde.maildir.instance1") + Query::RequestedProperties(QByteArrayList() << "name") ) @@ -149,7 +149,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto mailModel = Sink::Store::loadModel(query); QTRY_VERIFY(mailModel->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -172,7 +172,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto targetPath = tempDir.path() + "/maildir1/"; QDir dir(targetPath); @@ -180,7 +180,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -196,11 +196,11 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto mailModel = Sink::Store::loadModel(query); QTRY_VERIFY(mailModel->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -215,7 +215,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto targetPath = tempDir.path() + "/maildir1/cur/1365777830.R28.localhost.localdomain:2,S"; QFile file(targetPath); @@ -223,7 +223,7 @@ private Q_SLOTS: //Ensure all local data is processed Sink::Store::synchronize(query).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto mailModel = Sink::Store::loadModel(query); QTRY_VERIFY(mailModel->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -236,7 +236,7 @@ private Q_SLOTS: query.resources << "org.kde.maildir.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); Sink::ApplicationDomain::Folder folder("org.kde.maildir.instance1"); folder.setProperty("name", "testCreateFolder"); @@ -244,7 +244,7 @@ private Q_SLOTS: Sink::Store::create(folder).exec().waitForFinished(); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto targetPath = tempDir.path() + "/maildir1/testCreateFolder"; QFileInfo file(targetPath); @@ -262,7 +262,7 @@ private Q_SLOTS: Sink::ApplicationDomain::Folder folder("org.kde.maildir.instance1"); folder.setProperty("name", "testCreateFolder"); Sink::Store::create(folder).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); QTRY_VERIFY(QFileInfo(targetPath).exists()); Sink::Query folderQuery; @@ -274,7 +274,7 @@ private Q_SLOTS: auto createdFolder = model->index(0, 0, QModelIndex()).data(Sink::Store::DomainObjectRole).value(); Sink::Store::remove(*createdFolder).exec().waitForFinished(); - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); QTRY_VERIFY(!QFileInfo(targetPath).exists()); } @@ -284,7 +284,7 @@ private Q_SLOTS: query.resources << "org.kde.maildir.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); Sink::ApplicationDomain::Mail mail("org.kde.maildir.instance1"); mail.setProperty("name", "testCreateMail"); @@ -293,7 +293,7 @@ private Q_SLOTS: Sink::Store::create(mail).exec().waitForFinished(); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto targetPath = tempDir.path() + "/maildir1/new"; QDir dir(targetPath); @@ -308,7 +308,7 @@ private Q_SLOTS: auto query = Query::ResourceFilter("org.kde.maildir.instance1"); Store::synchronize(query).exec().waitForFinished(); - Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto result = Store::fetchOne( Query::ResourceFilter("org.kde.maildir.instance1") + Query::PropertyFilter("name", "maildir1") + Query::RequestedProperties(QByteArrayList() << "name") @@ -325,10 +325,10 @@ private Q_SLOTS: auto mail = mails.first(); return Store::remove(*mail) - .then(Resources::flushReplayQueue(query.resources)) //The change needs to be replayed already - .then(Resources::inspect(Resources::Inspection::ExistenceInspection(*mail, false))); - }) - .then([](){}); + .then(ResourceControl::flushReplayQueue(query.resources)) //The change needs to be replayed already + .then(ResourceControl::inspect(ResourceControl::Inspection::ExistenceInspection(*mail, false))); + }); + // .then([](){}); }) .exec(); result.waitForFinished(); @@ -342,7 +342,7 @@ private Q_SLOTS: auto query = Query::ResourceFilter("org.kde.maildir.instance1"); Store::synchronize(query).exec().waitForFinished(); - Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); Folder f; @@ -362,9 +362,9 @@ private Q_SLOTS: auto mail = mails.first(); mail->setProperty("unread", true); return Store::modify(*mail) - .then(Resources::flushReplayQueue(query.resources)) //The change needs to be replayed already - .then(Resources::inspect(Resources::Inspection::PropertyInspection(*mail, "unread", true))) - .then(Resources::inspect(Resources::Inspection::PropertyInspection(*mail, "subject", mail->getProperty("subject")))); + .then(ResourceControl::flushReplayQueue(query.resources)) //The change needs to be replayed already + .then(ResourceControl::inspect(ResourceControl::Inspection::PropertyInspection(*mail, "unread", true))) + .then(ResourceControl::inspect(ResourceControl::Inspection::PropertyInspection(*mail, "subject", mail->getProperty("subject")))); }) .then([](){}); }) diff --git a/tests/modelinteractivitytest.cpp b/tests/modelinteractivitytest.cpp index f180f9c..51a9cd8 100644 --- a/tests/modelinteractivitytest.cpp +++ b/tests/modelinteractivitytest.cpp @@ -73,7 +73,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; query.liveQuery = true; - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //Test QTime time; diff --git a/tests/querytest.cpp b/tests/querytest.cpp index 89d8693..42064c6 100644 --- a/tests/querytest.cpp +++ b/tests/querytest.cpp @@ -86,7 +86,7 @@ private Q_SLOTS: query.liveQuery = false; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data auto model = Sink::Store::loadModel(query); @@ -161,7 +161,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -181,7 +181,7 @@ private Q_SLOTS: query.parentProperty = "parent"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data auto model = Sink::Store::loadModel(query); @@ -210,7 +210,7 @@ private Q_SLOTS: query.propertyFilter.insert("uid", "test1"); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //We fetch before the data is available and rely on the live query mechanism to deliver the actual data auto model = Sink::Store::loadModel(query); @@ -230,7 +230,7 @@ private Q_SLOTS: query.resources << "org.kde.dummy.instance1"; //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); @@ -251,7 +251,7 @@ private Q_SLOTS: query.propertyFilter.insert("folder", folderEntity->identifier()); //Ensure all local data is processed - Sink::Resources::flushMessageQueue(query.resources).exec().waitForFinished(); + Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); //We fetch before the data is available and rely on the live query mechanism to deliver the actual data auto model = Sink::Store::loadModel(query); -- cgit v1.2.3