summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/bufferutils.h2
-rw-r--r--common/domainadaptor.h2
-rw-r--r--common/messagequeue.cpp4
-rw-r--r--common/pipeline.cpp6
-rw-r--r--common/propertymapper.cpp2
-rw-r--r--common/store.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/common/bufferutils.h b/common/bufferutils.h
index d6008c4..6763ced 100644
--- a/common/bufferutils.h
+++ b/common/bufferutils.h
@@ -26,7 +26,7 @@ static QByteArray extractBuffer(const flatbuffers::FlatBufferBuilder &fbb)
26static QList<QByteArray> fromVector(const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> &vector) 26static QList<QByteArray> fromVector(const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> &vector)
27{ 27{
28 QList<QByteArray> list; 28 QList<QByteArray> list;
29 for (const auto &data : vector) { 29 for (const flatbuffers::String *data : vector) {
30 Q_ASSERT(data); 30 Q_ASSERT(data);
31 list << QByteArray::fromStdString(data->str()); 31 list << QByteArray::fromStdString(data->str());
32 } 32 }
diff --git a/common/domainadaptor.h b/common/domainadaptor.h
index 25448f3..e0912e4 100644
--- a/common/domainadaptor.h
+++ b/common/domainadaptor.h
@@ -115,7 +115,7 @@ public:
115 /** 115 /**
116 * Returns all available properties for which a mapping exists (no matter what the buffer contains) 116 * Returns all available properties for which a mapping exists (no matter what the buffer contains)
117 */ 117 */
118 virtual QList<QByteArray> availableProperties() const 118 virtual QList<QByteArray> availableProperties() const Q_DECL_OVERRIDE
119 { 119 {
120 return mResourceMapper->availableProperties() + mLocalMapper->availableProperties(); 120 return mResourceMapper->availableProperties() + mLocalMapper->availableProperties();
121 } 121 }
diff --git a/common/messagequeue.cpp b/common/messagequeue.cpp
index a6e44e3..3567a10 100644
--- a/common/messagequeue.cpp
+++ b/common/messagequeue.cpp
@@ -55,7 +55,7 @@ void MessageQueue::startTransaction()
55 return; 55 return;
56 } 56 }
57 processRemovals(); 57 processRemovals();
58 mWriteTransaction = std::move(mStorage.createTransaction(Sink::Storage::ReadWrite)); 58 mWriteTransaction = mStorage.createTransaction(Sink::Storage::ReadWrite);
59} 59}
60 60
61void MessageQueue::commit() 61void MessageQueue::commit()
@@ -87,7 +87,7 @@ void MessageQueue::processRemovals()
87 if (mWriteTransaction) { 87 if (mWriteTransaction) {
88 return; 88 return;
89 } 89 }
90 auto transaction = std::move(mStorage.createTransaction(Sink::Storage::ReadWrite)); 90 auto transaction = mStorage.createTransaction(Sink::Storage::ReadWrite);
91 for (const auto &key : mPendingRemoval) { 91 for (const auto &key : mPendingRemoval) {
92 transaction.openDatabase().remove(key); 92 transaction.openDatabase().remove(key);
93 } 93 }
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index f1a4a32..000d2b2 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -119,9 +119,9 @@ void Pipeline::startTransaction()
119 if (d->storage.exists()) { 119 if (d->storage.exists()) {
120 while (!d->transaction.validateNamedDatabases()) { 120 while (!d->transaction.validateNamedDatabases()) {
121 SinkWarning() << "Opened an invalid transaction!!!!!!"; 121 SinkWarning() << "Opened an invalid transaction!!!!!!";
122 d->transaction = std::move(storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) { 122 d->transaction = storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) {
123 SinkWarning() << error.message; 123 SinkWarning() << error.message;
124 })); 124 });
125 } 125 }
126 } 126 }
127} 127}
@@ -316,7 +316,7 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
316 316
317 // Remove deletions 317 // Remove deletions
318 if (modifyEntity->deletions()) { 318 if (modifyEntity->deletions()) {
319 for (const auto &property : *modifyEntity->deletions()) { 319 for (const flatbuffers::String *property : *modifyEntity->deletions()) {
320 newAdaptor->setProperty(BufferUtils::extractBuffer(property), QVariant()); 320 newAdaptor->setProperty(BufferUtils::extractBuffer(property), QVariant());
321 } 321 }
322 } 322 }
diff --git a/common/propertymapper.cpp b/common/propertymapper.cpp
index 130ba0b..9fe2d30 100644
--- a/common/propertymapper.cpp
+++ b/common/propertymapper.cpp
@@ -53,7 +53,7 @@ flatbuffers::uoffset_t variantToProperty<QByteArrayList>(const QVariant &propert
53 if (property.isValid()) { 53 if (property.isValid()) {
54 const auto list = property.value<QByteArrayList>(); 54 const auto list = property.value<QByteArrayList>();
55 std::vector<flatbuffers::Offset<flatbuffers::String>> vector; 55 std::vector<flatbuffers::Offset<flatbuffers::String>> vector;
56 for (const auto value : list) { 56 for (const auto &value : list) {
57 auto offset = fbb.CreateString(value.toStdString()); 57 auto offset = fbb.CreateString(value.toStdString());
58 vector.push_back(offset); 58 vector.push_back(offset);
59 } 59 }
diff --git a/common/store.cpp b/common/store.cpp
index 363878c..07f41f8 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -360,7 +360,7 @@ QList<DomainType> Store::read(const Sink::Query &q)
360 SinkTrace() << "Found value: " << value->identifier(); 360 SinkTrace() << "Found value: " << value->identifier();
361 list << *value; 361 list << *value;
362 }); 362 });
363 for (const auto resourceInstanceIdentifier : resources.keys()) { 363 for (const auto &resourceInstanceIdentifier : resources.keys()) {
364 const auto resourceType = resources.value(resourceInstanceIdentifier); 364 const auto resourceType = resources.value(resourceInstanceIdentifier);
365 SinkTrace() << "Looking for " << resourceType << resourceInstanceIdentifier; 365 SinkTrace() << "Looking for " << resourceType << resourceInstanceIdentifier;
366 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceType, resourceInstanceIdentifier); 366 auto facade = FacadeFactory::instance().getFacade<DomainType>(resourceType, resourceInstanceIdentifier);