From 615fc9df81555ce5a2b16747640beba43e109ef4 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 7 Oct 2015 16:26:52 +0200 Subject: Always get the latest revision directly from storage We can just as well read the latest available revision from storage. --- tests/genericfacadetest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/genericfacadetest.cpp b/tests/genericfacadetest.cpp index 4c58b91..f21de70 100644 --- a/tests/genericfacadetest.cpp +++ b/tests/genericfacadetest.cpp @@ -25,14 +25,16 @@ class TestEntityStorage : public EntityStorage &revisionRange, const QSharedPointer > &resultProvider) Q_DECL_OVERRIDE + virtual qint64 read(const Akonadi2::Query &query, qint64 oldRevision, const QSharedPointer > &resultProvider) Q_DECL_OVERRIDE { for (const auto &res : mResults) { resultProvider->add(res); } + return mLatestRevision; } QList mResults; + qint64 mLatestRevision; }; class TestResourceAccess : public Akonadi2::ResourceAccessInterface @@ -117,6 +119,7 @@ private Q_SLOTS: //Enter a second result storage->mResults.clear(); storage->mResults << QSharedPointer::create("resource", "id2", 0, QSharedPointer()); + storage->mLatestRevision = 2; resourceAccess->emit revisionChanged(2); //Hack to get event loop in synclistresult to abort again -- cgit v1.2.3