From 1812c077d6461b3e9fb865f47cffafc3c179e136 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 19 Jan 2016 14:07:17 +0100 Subject: Disambiguate between what we want to flush Even though the implementation is still exactly the same --- common/clientapi.cpp | 5 +++++ common/clientapi.h | 5 +++++ tests/maildirresourcetest.cpp | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/clientapi.cpp b/common/clientapi.cpp index 40257bb..0b417d3 100644 --- a/common/clientapi.cpp +++ b/common/clientapi.cpp @@ -229,6 +229,11 @@ KAsync::Job Store::flushMessageQueue(const QByteArrayList &resourceIdentif .template then([](){}); } +KAsync::Job Store::flushReplayQueue(const QByteArrayList &resourceIdentifier) +{ + return flushMessageQueue(resourceIdentifier); +} + template KAsync::Job Store::fetchOne(const Akonadi2::Query &query) { diff --git a/common/clientapi.h b/common/clientapi.h index 14caa7a..e1d5b8d 100644 --- a/common/clientapi.h +++ b/common/clientapi.h @@ -99,6 +99,11 @@ public: */ static KAsync::Job flushMessageQueue(const QByteArrayList &resourceIdentifier); + /** + * Flushes any pending messages that haven't been replayed to the source. + */ + static KAsync::Job flushReplayQueue(const QByteArrayList &resourceIdentifier); + /** * Removes a resource from disk. */ diff --git a/tests/maildirresourcetest.cpp b/tests/maildirresourcetest.cpp index 146489d..ec4f6a4 100644 --- a/tests/maildirresourcetest.cpp +++ b/tests/maildirresourcetest.cpp @@ -321,7 +321,7 @@ private Q_SLOTS: auto mail = mails.first(); return Store::remove(*mail) - .then(Store::flushMessageQueue(query.resources)) //The change needs to be replayed already + .then(Store::flushReplayQueue(query.resources)) //The change needs to be replayed already .then(Resources::inspect(Resources::Inspection::ExistenceInspection(*mail, false))); }) .then([](){}); @@ -357,7 +357,7 @@ private Q_SLOTS: mail->setProperty("unread", true); auto inspectionCommand = Resources::Inspection::PropertyInspection(*mail, "unread", true); return Store::modify(*mail) - .then(Store::flushMessageQueue(query.resources)) //The change needs to be replayed already + .then(Store::flushReplayQueue(query.resources)) //The change needs to be replayed already .then(Resources::inspect(inspectionCommand)); }) .then([](){}); -- cgit v1.2.3