diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-01-27 18:44:03 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-01-27 18:45:54 +0100 |
commit | 142bf3d8bc6569a432e065e851f026a46e9595ed (patch) | |
tree | 631d40828e2dcc63e0a12e5b9de1e8c0e3ebddf0 /dummyresource/resourcefactory.cpp | |
parent | 7137cb09a1f7a4d36e9865d9c9e1f54d59ddbc68 (diff) | |
download | sink-142bf3d8bc6569a432e065e851f026a46e9595ed.tar.gz sink-142bf3d8bc6569a432e065e851f026a46e9595ed.zip |
introduce a set of isInternalKey functions to hide this impl detail
Diffstat (limited to 'dummyresource/resourcefactory.cpp')
-rw-r--r-- | dummyresource/resourcefactory.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp index aefd66f..e5019f2 100644 --- a/dummyresource/resourcefactory.cpp +++ b/dummyresource/resourcefactory.cpp | |||
@@ -113,9 +113,8 @@ public: | |||
113 | mProcessingLock(false) | 113 | mProcessingLock(false) |
114 | { | 114 | { |
115 | for (auto queue : mCommandQueues) { | 115 | for (auto queue : mCommandQueues) { |
116 | bool ret = connect(queue, &MessageQueue::messageReady, this, &Processor::process); | 116 | const bool ret = connect(queue, &MessageQueue::messageReady, this, &Processor::process); |
117 | Q_UNUSED(ret); | 117 | Q_UNUSED(ret); |
118 | Q_ASSERT(ret); | ||
119 | } | 118 | } |
120 | } | 119 | } |
121 | 120 | ||
@@ -298,7 +297,7 @@ void findByRemoteId(QSharedPointer<Akonadi2::Storage> storage, const QString &ri | |||
298 | //TODO lookup in rid index instead of doing a full scan | 297 | //TODO lookup in rid index instead of doing a full scan |
299 | const std::string ridString = rid.toStdString(); | 298 | const std::string ridString = rid.toStdString(); |
300 | storage->scan("", [&](void *keyValue, int keySize, void *dataValue, int dataSize) -> bool { | 299 | storage->scan("", [&](void *keyValue, int keySize, void *dataValue, int dataSize) -> bool { |
301 | if (QByteArray::fromRawData(static_cast<char*>(keyValue), keySize).startsWith("__internal")) { | 300 | if (Akonadi2::Storage::isInternalKey(keyValue, keySize)) { |
302 | return true; | 301 | return true; |
303 | } | 302 | } |
304 | 303 | ||