From 89b6f63bab839ab0504cd3067f0389afe4dc47e3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 7 Nov 2016 21:48:44 +0100 Subject: Implement debug stream operators for query. --- tests/dummyresourcetest.cpp | 2 +- tests/maildirsyncbenchmark.cpp | 2 +- tests/testimplementations.h | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index f8d8543..eea63c0 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp @@ -136,7 +136,7 @@ private slots: void testResourceSync() { ::DummyResource resource(getContext()); - auto job = resource.synchronizeWithSource(); + auto job = resource.synchronizeWithSource(Sink::QueryBase()); // TODO pass in optional timeout? auto future = job.exec(); future.waitForFinished(); diff --git a/tests/maildirsyncbenchmark.cpp b/tests/maildirsyncbenchmark.cpp index d84c758..ab09395 100644 --- a/tests/maildirsyncbenchmark.cpp +++ b/tests/maildirsyncbenchmark.cpp @@ -87,7 +87,7 @@ private slots: MaildirResource resource("sink.maildir.test1", pipeline); QTime time; time.start(); - resource.Sink::GenericResource::synchronizeWithSource().exec().waitForFinished(); + resource.Sink::GenericResource::synchronizeWithSource(Sink::QueryBase()).exec().waitForFinished(); std::cout << "Sync took " << time.elapsed() << std::endl; resource.processAllMessages().exec().waitForFinished(); const auto allProcessedTime = time.elapsed(); diff --git a/tests/testimplementations.h b/tests/testimplementations.h index cf7a3da..111c884 100644 --- a/tests/testimplementations.h +++ b/tests/testimplementations.h @@ -70,6 +70,10 @@ public: { return KAsync::null(); } + KAsync::Job synchronizeResource(const Sink::QueryBase &) Q_DECL_OVERRIDE + { + return KAsync::null(); + } public slots: void open() Q_DECL_OVERRIDE @@ -111,7 +115,7 @@ public: { } - KAsync::Job synchronizeWithSource() Q_DECL_OVERRIDE + KAsync::Job synchronizeWithSource(const Sink::QueryBase &query) Q_DECL_OVERRIDE { return KAsync::null(); } -- cgit v1.2.3