From af7758fe70884322fdf405a04428631b646c5b5d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 14 Nov 2016 09:34:23 +0100 Subject: Cleanup --- common/domainadaptor.h | 1 - common/genericresource.cpp | 2 +- common/query.h | 6 +----- common/resourcecontrol.cpp | 10 ++++++++++ common/resourcecontrol.h | 2 ++ 5 files changed, 14 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/domainadaptor.h b/common/domainadaptor.h index 0f5bdc7..e7b8c1e 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h @@ -146,7 +146,6 @@ public: } else if (mIndex && mIndexMapper->hasMapping(key)) { return mIndexMapper->getProperty(key, *mIndex, *this); } - SinkWarning() << "No mapping available for key " << key << mLocalBuffer << mResourceBuffer; return QVariant(); } diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 1fc7744..c4c8bc6 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp @@ -266,7 +266,7 @@ GenericResource::GenericResource(const ResourceContext &resourceContext, const Q return KAsync::error(-1, "Invalid inspection command."); }); { - auto ret =QObject::connect(mProcessor.get(), &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); }); + auto ret = QObject::connect(mProcessor.get(), &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); }); Q_ASSERT(ret); } { diff --git a/common/query.h b/common/query.h index aa2d643..3f14dd8 100644 --- a/common/query.h +++ b/common/query.h @@ -435,11 +435,7 @@ private: class SyncScope : public QueryBase { public: - template - SyncScope() - { - setType(ApplicationDomain::getTypeName()); - } + using QueryBase::QueryBase; Query::Filter getResourceFilter() const { diff --git a/common/resourcecontrol.cpp b/common/resourcecontrol.cpp index 90c8fb9..3568844 100644 --- a/common/resourcecontrol.cpp +++ b/common/resourcecontrol.cpp @@ -93,11 +93,21 @@ KAsync::Job ResourceControl::flushMessageQueue(const QByteArrayList &resou }); } +KAsync::Job ResourceControl::flushMessageQueue(const QByteArray &resourceIdentifier) +{ + return flushMessageQueue(QByteArrayList() << resourceIdentifier); +} + KAsync::Job ResourceControl::flushReplayQueue(const QByteArrayList &resourceIdentifier) { return flushMessageQueue(resourceIdentifier); } +KAsync::Job ResourceControl::flushReplayQueue(const QByteArray &resourceIdentifier) +{ + return flushReplayQueue(QByteArrayList() << resourceIdentifier); +} + template KAsync::Job ResourceControl::inspect(const Inspection &inspectionCommand) { diff --git a/common/resourcecontrol.h b/common/resourcecontrol.h index d483153..9e603e4 100644 --- a/common/resourcecontrol.h +++ b/common/resourcecontrol.h @@ -51,10 +51,12 @@ KAsync::Job SINK_EXPORT start(const QByteArray &resourceIdentifier); * Flushes any pending messages to disk */ KAsync::Job SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); +KAsync::Job SINK_EXPORT flushMessageQueue(const QByteArray &resourceIdentifier); /** * Flushes any pending messages that haven't been replayed to the source. */ KAsync::Job SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); +KAsync::Job SINK_EXPORT flushReplayQueue(const QByteArray &resourceIdentifier); } } -- cgit v1.2.3