diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-14 09:34:23 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-14 09:34:23 +0100 |
commit | af7758fe70884322fdf405a04428631b646c5b5d (patch) | |
tree | 85e06d8540657d0f538d0621037421f1e14d4ee3 | |
parent | 4e6b3ce7d1ce97c3e1fb9ae53c5b2be1787acc6b (diff) | |
download | sink-af7758fe70884322fdf405a04428631b646c5b5d.tar.gz sink-af7758fe70884322fdf405a04428631b646c5b5d.zip |
Cleanup
-rw-r--r-- | common/domainadaptor.h | 1 | ||||
-rw-r--r-- | common/genericresource.cpp | 2 | ||||
-rw-r--r-- | common/query.h | 6 | ||||
-rw-r--r-- | common/resourcecontrol.cpp | 10 | ||||
-rw-r--r-- | common/resourcecontrol.h | 2 |
5 files changed, 14 insertions, 7 deletions
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: | |||
146 | } else if (mIndex && mIndexMapper->hasMapping(key)) { | 146 | } else if (mIndex && mIndexMapper->hasMapping(key)) { |
147 | return mIndexMapper->getProperty(key, *mIndex, *this); | 147 | return mIndexMapper->getProperty(key, *mIndex, *this); |
148 | } | 148 | } |
149 | SinkWarning() << "No mapping available for key " << key << mLocalBuffer << mResourceBuffer; | ||
150 | return QVariant(); | 149 | return QVariant(); |
151 | } | 150 | } |
152 | 151 | ||
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 | |||
266 | return KAsync::error<void>(-1, "Invalid inspection command."); | 266 | return KAsync::error<void>(-1, "Invalid inspection command."); |
267 | }); | 267 | }); |
268 | { | 268 | { |
269 | auto ret =QObject::connect(mProcessor.get(), &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); }); | 269 | auto ret = QObject::connect(mProcessor.get(), &CommandProcessor::error, [this](int errorCode, const QString &msg) { onProcessorError(errorCode, msg); }); |
270 | Q_ASSERT(ret); | 270 | Q_ASSERT(ret); |
271 | } | 271 | } |
272 | { | 272 | { |
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: | |||
435 | 435 | ||
436 | class SyncScope : public QueryBase { | 436 | class SyncScope : public QueryBase { |
437 | public: | 437 | public: |
438 | template<typename T> | 438 | using QueryBase::QueryBase; |
439 | SyncScope() | ||
440 | { | ||
441 | setType(ApplicationDomain::getTypeName<T>()); | ||
442 | } | ||
443 | 439 | ||
444 | Query::Filter getResourceFilter() const | 440 | Query::Filter getResourceFilter() const |
445 | { | 441 | { |
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<void> ResourceControl::flushMessageQueue(const QByteArrayList &resou | |||
93 | }); | 93 | }); |
94 | } | 94 | } |
95 | 95 | ||
96 | KAsync::Job<void> ResourceControl::flushMessageQueue(const QByteArray &resourceIdentifier) | ||
97 | { | ||
98 | return flushMessageQueue(QByteArrayList() << resourceIdentifier); | ||
99 | } | ||
100 | |||
96 | KAsync::Job<void> ResourceControl::flushReplayQueue(const QByteArrayList &resourceIdentifier) | 101 | KAsync::Job<void> ResourceControl::flushReplayQueue(const QByteArrayList &resourceIdentifier) |
97 | { | 102 | { |
98 | return flushMessageQueue(resourceIdentifier); | 103 | return flushMessageQueue(resourceIdentifier); |
99 | } | 104 | } |
100 | 105 | ||
106 | KAsync::Job<void> ResourceControl::flushReplayQueue(const QByteArray &resourceIdentifier) | ||
107 | { | ||
108 | return flushReplayQueue(QByteArrayList() << resourceIdentifier); | ||
109 | } | ||
110 | |||
101 | template <class DomainType> | 111 | template <class DomainType> |
102 | KAsync::Job<void> ResourceControl::inspect(const Inspection &inspectionCommand) | 112 | KAsync::Job<void> ResourceControl::inspect(const Inspection &inspectionCommand) |
103 | { | 113 | { |
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<void> SINK_EXPORT start(const QByteArray &resourceIdentifier); | |||
51 | * Flushes any pending messages to disk | 51 | * Flushes any pending messages to disk |
52 | */ | 52 | */ |
53 | KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); | 53 | KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArrayList &resourceIdentifier); |
54 | KAsync::Job<void> SINK_EXPORT flushMessageQueue(const QByteArray &resourceIdentifier); | ||
54 | 55 | ||
55 | /** | 56 | /** |
56 | * Flushes any pending messages that haven't been replayed to the source. | 57 | * Flushes any pending messages that haven't been replayed to the source. |
57 | */ | 58 | */ |
58 | KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); | 59 | KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArrayList &resourceIdentifier); |
60 | KAsync::Job<void> SINK_EXPORT flushReplayQueue(const QByteArray &resourceIdentifier); | ||
59 | } | 61 | } |
60 | } | 62 | } |