From c08ac164d20c56e4b2890ebc9f2acda2c5723b5c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 8 Oct 2015 16:51:06 +0200 Subject: Cleanup --- common/entitystorage.cpp | 2 -- common/entitystorage.h | 2 -- common/genericresource.h | 1 + common/resource.h | 1 - common/storage_common.cpp | 8 +++++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/common/entitystorage.cpp b/common/entitystorage.cpp index c60135e..33b65d6 100644 --- a/common/entitystorage.cpp +++ b/common/entitystorage.cpp @@ -90,8 +90,6 @@ ResultSet EntityStorageBase::filteredSet(const ResultSet &resultSet, const std:: //Read through the source values and return whatever matches the filter std::function)> generator = [this, resultSetPtr, &transaction, filter, initialQuery](std::function callback) -> bool { while (resultSetPtr->next()) { - //TODO. every read value is actually a revision that contains one of three operations. Reflect that so the result set can be updated appropriately. - //TODO while getting the initial set everything is adding readEntity(transaction, resultSetPtr->id(), [this, filter, callback, initialQuery](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &domainObject, Akonadi2::Operation operation) { if (filter(domainObject)) { if (initialQuery) { diff --git a/common/entitystorage.h b/common/entitystorage.h index 68b9e46..78dbcda 100644 --- a/common/entitystorage.h +++ b/common/entitystorage.h @@ -109,8 +109,6 @@ public: auto transaction = storage.createTransaction(Akonadi2::Storage::ReadOnly); Log() << "Querying" << baseRevision; - //TODO fallback in case the old revision is no longer available to clear + redo complete initial scan - // auto resultSet = getResultSet(query, transaction, baseRevision); while(resultSet.next([this, resultProvider](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &value, Akonadi2::Operation operation) -> bool { switch (operation) { diff --git a/common/genericresource.h b/common/genericresource.h index 532632e..2d171b6 100644 --- a/common/genericresource.h +++ b/common/genericresource.h @@ -29,6 +29,7 @@ class Processor; namespace Akonadi2 { +class Pipeline; /** * Generic Resource implementation. diff --git a/common/resource.h b/common/resource.h index 6563c09..1a97aeb 100644 --- a/common/resource.h +++ b/common/resource.h @@ -24,7 +24,6 @@ namespace Akonadi2 { -class Pipeline; class FacadeFactory; /** diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 512a13f..2c23f97 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp @@ -66,7 +66,9 @@ qint64 Storage::maxRevision(const Akonadi2::Storage::Transaction &transaction) r = revision.toLongLong(); return false; }, [](const Error &error){ - std::cout << "Coultn'd find uid for revision "; + if (error.code != Akonadi2::Storage::NotFound) { + std::cout << "Coultn'd find the maximum revision" << std::endl; + } }); return r; } @@ -78,7 +80,7 @@ QByteArray Storage::getUidFromRevision(const Akonadi2::Storage::Transaction &tra uid = value; return false; }, [revision](const Error &error){ - std::cout << "Coultn'd find uid for revision " << revision; + std::cout << "Coultn'd find uid for revision " << revision << std::endl; }); return uid; } @@ -90,7 +92,7 @@ QByteArray Storage::getTypeFromRevision(const Akonadi2::Storage::Transaction &tr type = value; return false; }, [revision](const Error &error){ - std::cout << "Coultn'd find type for revision " << revision; + std::cout << "Coultn'd find type for revision " << revision << std::endl; }); return type; } -- cgit v1.2.3