diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-25 19:18:08 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-25 19:42:27 +0200 |
commit | 0f6f34ca2fca81734544b32e8dbc8ee32122bb65 (patch) | |
tree | 79bb05d19d6d7f3ec4966b2913b7628d3ad8de0f | |
parent | 7f0f45c544b3a48feec3226faa8bb3018d542d9c (diff) | |
download | sink-0f6f34ca2fca81734544b32e8dbc8ee32122bb65.tar.gz sink-0f6f34ca2fca81734544b32e8dbc8ee32122bb65.zip |
Fixed more warnings and then disabled them
..because there is a boatload more to fix.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | common/adaptorfactoryregistry.cpp | 2 | ||||
-rw-r--r-- | common/commands.cpp | 2 | ||||
-rw-r--r-- | common/domainadaptor.h | 2 | ||||
-rw-r--r-- | common/facade.h | 2 | ||||
-rw-r--r-- | common/facadefactory.cpp | 2 | ||||
-rw-r--r-- | common/genericresource.h | 2 | ||||
-rw-r--r-- | common/index.cpp | 2 | ||||
-rw-r--r-- | common/listener.cpp | 14 | ||||
-rw-r--r-- | common/listener.h | 2 | ||||
-rw-r--r-- | common/resource.cpp | 2 | ||||
-rw-r--r-- | common/resourceaccess.cpp | 8 | ||||
-rw-r--r-- | common/resourcefacade.cpp | 4 | ||||
-rw-r--r-- | common/resultprovider.h | 2 | ||||
-rw-r--r-- | common/resultset.cpp | 2 | ||||
-rw-r--r-- | common/synchronizer.h | 2 | ||||
-rw-r--r-- | common/test.cpp | 5 | ||||
-rw-r--r-- | tests/hawd/dataset.cpp | 2 | ||||
-rw-r--r-- | tests/storagetest.cpp | 2 |
19 files changed, 30 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9294660..e85627b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -122,7 +122,7 @@ endfunction() | |||
122 | 122 | ||
123 | set(CMAKE_AUTOMOC ON) | 123 | set(CMAKE_AUTOMOC ON) |
124 | if (${CATCH_ERRORS}) | 124 | if (${CATCH_ERRORS}) |
125 | add_definitions("-Werror -Wall -Weverything -Wno-unused-function -Wno-cast-align -Wno-used-but-marked-unused -Wno-shadow -Wno-weak-vtables -Wno-global-constructors -Wno-deprecated -Wno-weak-template-vtables -Wno-exit-time-destructors -Wno-covered-switch-default -Wno-shorten-64-to-32 -Wno-documentation -Wno-old-style-cast -Wno-extra-semi -Wno-unused-parameter -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-missing-noreturn -Wno-missing-prototypes -Wno-documentation-unknown-command -Wno-sign-conversion -Wno-gnu-zero-variadic-macro-arguments -Wno-disabled-macro-expansion -Wno-vla-extension -Wno-vla -Wno-undefined-func-template -Wno-#warnings") | 125 | add_definitions("-Werror -Wall -Weverything -Wno-unused-function -Wno-cast-align -Wno-used-but-marked-unused -Wno-shadow -Wno-weak-vtables -Wno-global-constructors -Wno-deprecated -Wno-weak-template-vtables -Wno-exit-time-destructors -Wno-covered-switch-default -Wno-shorten-64-to-32 -Wno-documentation -Wno-old-style-cast -Wno-extra-semi -Wno-unused-parameter -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-missing-noreturn -Wno-missing-prototypes -Wno-documentation-unknown-command -Wno-sign-conversion -Wno-gnu-zero-variadic-macro-arguments -Wno-disabled-macro-expansion -Wno-vla-extension -Wno-vla -Wno-undefined-func-template -Wno-#warnings -Wno-unused-template -Wno-inconsistent-missing-destructor-override -Wno-zero-as-null-pointer-constant -Wno-unused-lambda-capture") |
126 | endif() | 126 | endif() |
127 | add_definitions("-std=c++0x -g") | 127 | add_definitions("-std=c++0x -g") |
128 | include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FLATBUFFERS_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/common 3rdparty) | 128 | include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FLATBUFFERS_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/common 3rdparty) |
diff --git a/common/adaptorfactoryregistry.cpp b/common/adaptorfactoryregistry.cpp index 91b5a4c..c302bca 100644 --- a/common/adaptorfactoryregistry.cpp +++ b/common/adaptorfactoryregistry.cpp | |||
@@ -34,7 +34,7 @@ using namespace Sink; | |||
34 | AdaptorFactoryRegistry &AdaptorFactoryRegistry::instance() | 34 | AdaptorFactoryRegistry &AdaptorFactoryRegistry::instance() |
35 | { | 35 | { |
36 | // QMutexLocker locker(&sMutex); | 36 | // QMutexLocker locker(&sMutex); |
37 | static AdaptorFactoryRegistry *instance = 0; | 37 | static AdaptorFactoryRegistry *instance = nullptr; |
38 | if (!instance) { | 38 | if (!instance) { |
39 | instance = new AdaptorFactoryRegistry; | 39 | instance = new AdaptorFactoryRegistry; |
40 | } | 40 | } |
diff --git a/common/commands.cpp b/common/commands.cpp index a92b455..0ec2c7b 100644 --- a/common/commands.cpp +++ b/common/commands.cpp | |||
@@ -80,7 +80,7 @@ int headerSize() | |||
80 | 80 | ||
81 | void write(QLocalSocket *device, int messageId, int commandId) | 81 | void write(QLocalSocket *device, int messageId, int commandId) |
82 | { | 82 | { |
83 | write(device, messageId, commandId, 0, 0); | 83 | write(device, messageId, commandId, nullptr, 0); |
84 | } | 84 | } |
85 | 85 | ||
86 | static void write(QLocalSocket *device, const char *buffer, uint size) | 86 | static void write(QLocalSocket *device, const char *buffer, uint size) |
diff --git a/common/domainadaptor.h b/common/domainadaptor.h index f981a1f..bcfc18d 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h | |||
@@ -201,7 +201,7 @@ public: | |||
201 | return true; | 201 | return true; |
202 | } | 202 | } |
203 | 203 | ||
204 | virtual bool createBuffer(const QSharedPointer<Sink::ApplicationDomain::BufferAdaptor> &bufferAdaptor, flatbuffers::FlatBufferBuilder &fbb, void const *metadataData = 0, size_t metadataSize = 0) Q_DECL_OVERRIDE | 204 | virtual bool createBuffer(const QSharedPointer<Sink::ApplicationDomain::BufferAdaptor> &bufferAdaptor, flatbuffers::FlatBufferBuilder &fbb, void const *metadataData = nullptr, size_t metadataSize = 0) Q_DECL_OVERRIDE |
205 | { | 205 | { |
206 | //TODO rewrite the unterlying functions so we don't have to wrap the bufferAdaptor | 206 | //TODO rewrite the unterlying functions so we don't have to wrap the bufferAdaptor |
207 | auto newObject = Sink::ApplicationDomain::ApplicationDomainType("", "", 0, bufferAdaptor); | 207 | auto newObject = Sink::ApplicationDomain::ApplicationDomainType("", "", 0, bufferAdaptor); |
diff --git a/common/facade.h b/common/facade.h index 0ec2e59..33e4b57 100644 --- a/common/facade.h +++ b/common/facade.h | |||
@@ -57,7 +57,7 @@ public: | |||
57 | * @param adaptorFactory is the adaptor factory used to generate the mappings from domain to resource types and vice versa | 57 | * @param adaptorFactory is the adaptor factory used to generate the mappings from domain to resource types and vice versa |
58 | */ | 58 | */ |
59 | GenericFacade(const ResourceContext &context); | 59 | GenericFacade(const ResourceContext &context); |
60 | virtual ~GenericFacade(); | 60 | virtual ~GenericFacade() Q_DECL_OVERRIDE; |
61 | 61 | ||
62 | static QByteArray bufferTypeForDomainType(); | 62 | static QByteArray bufferTypeForDomainType(); |
63 | KAsync::Job<void> create(const DomainType &domainObject) Q_DECL_OVERRIDE; | 63 | KAsync::Job<void> create(const DomainType &domainObject) Q_DECL_OVERRIDE; |
diff --git a/common/facadefactory.cpp b/common/facadefactory.cpp index c26c0a1..0657414 100644 --- a/common/facadefactory.cpp +++ b/common/facadefactory.cpp | |||
@@ -35,7 +35,7 @@ FacadeFactory::FacadeFactory() | |||
35 | FacadeFactory &FacadeFactory::instance() | 35 | FacadeFactory &FacadeFactory::instance() |
36 | { | 36 | { |
37 | QMutexLocker locker(&sMutex); | 37 | QMutexLocker locker(&sMutex); |
38 | static FacadeFactory *instance = 0; | 38 | static FacadeFactory *instance = nullptr; |
39 | if (!instance) { | 39 | if (!instance) { |
40 | instance = new FacadeFactory; | 40 | instance = new FacadeFactory; |
41 | } | 41 | } |
diff --git a/common/genericresource.h b/common/genericresource.h index 11ede0c..d34a361 100644 --- a/common/genericresource.h +++ b/common/genericresource.h | |||
@@ -37,7 +37,7 @@ class SINK_EXPORT GenericResource : public Resource | |||
37 | { | 37 | { |
38 | public: | 38 | public: |
39 | GenericResource(const Sink::ResourceContext &context, const QSharedPointer<Pipeline> &pipeline = QSharedPointer<Pipeline>()); | 39 | GenericResource(const Sink::ResourceContext &context, const QSharedPointer<Pipeline> &pipeline = QSharedPointer<Pipeline>()); |
40 | virtual ~GenericResource(); | 40 | virtual ~GenericResource() Q_DECL_OVERRIDE; |
41 | 41 | ||
42 | virtual void processCommand(int commandId, const QByteArray &data) Q_DECL_OVERRIDE; | 42 | virtual void processCommand(int commandId, const QByteArray &data) Q_DECL_OVERRIDE; |
43 | virtual void setLowerBoundRevision(qint64 revision) Q_DECL_OVERRIDE; | 43 | virtual void setLowerBoundRevision(qint64 revision) Q_DECL_OVERRIDE; |
diff --git a/common/index.cpp b/common/index.cpp index 725c28b..a4641bc 100644 --- a/common/index.cpp +++ b/common/index.cpp | |||
@@ -48,6 +48,6 @@ QByteArray Index::lookup(const QByteArray &key) | |||
48 | { | 48 | { |
49 | QByteArray result; | 49 | QByteArray result; |
50 | //We have to create a deep copy, otherwise the returned data may become invalid when the transaction ends. | 50 | //We have to create a deep copy, otherwise the returned data may become invalid when the transaction ends. |
51 | lookup(key, [&](const QByteArray &value) { result = QByteArray(value.constData(), value.size()); }, [this](const Index::Error &) { }); | 51 | lookup(key, [&](const QByteArray &value) { result = QByteArray(value.constData(), value.size()); }, [](const Index::Error &) { }); |
52 | return result; | 52 | return result; |
53 | } | 53 | } |
diff --git a/common/listener.cpp b/common/listener.cpp index d2cab72..b9426db 100644 --- a/common/listener.cpp +++ b/common/listener.cpp | |||
@@ -109,10 +109,10 @@ void Listener::emergencyAbortAllConnections() | |||
109 | SinkWarning() << "Sending panic"; | 109 | SinkWarning() << "Sending panic"; |
110 | client.socket->write("PANIC"); | 110 | client.socket->write("PANIC"); |
111 | client.socket->waitForBytesWritten(); | 111 | client.socket->waitForBytesWritten(); |
112 | disconnect(client.socket, 0, this, 0); | 112 | disconnect(client.socket, nullptr, this, nullptr); |
113 | client.socket->abort(); | 113 | client.socket->abort(); |
114 | delete client.socket; | 114 | delete client.socket; |
115 | client.socket = 0; | 115 | client.socket = nullptr; |
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
@@ -123,10 +123,10 @@ void Listener::closeAllConnections() | |||
123 | { | 123 | { |
124 | for (Client &client : m_connections) { | 124 | for (Client &client : m_connections) { |
125 | if (client.socket) { | 125 | if (client.socket) { |
126 | disconnect(client.socket, 0, this, 0); | 126 | disconnect(client.socket, nullptr, this, nullptr); |
127 | client.socket->close(); | 127 | client.socket->close(); |
128 | delete client.socket; | 128 | delete client.socket; |
129 | client.socket = 0; | 129 | client.socket = nullptr; |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
@@ -363,9 +363,9 @@ bool Listener::processClientBuffer(Client &client) | |||
363 | return false; | 363 | return false; |
364 | } | 364 | } |
365 | 365 | ||
366 | const uint messageId = *(uint *)client.commandBuffer.constData(); | 366 | const uint messageId = *(const uint *)client.commandBuffer.constData(); |
367 | const int commandId = *(int *)(client.commandBuffer.constData() + sizeof(uint)); | 367 | const int commandId = *(const int *)(client.commandBuffer.constData() + sizeof(uint)); |
368 | const uint size = *(uint *)(client.commandBuffer.constData() + sizeof(int) + sizeof(uint)); | 368 | const uint size = *(const uint *)(client.commandBuffer.constData() + sizeof(int) + sizeof(uint)); |
369 | SinkTrace() << "Received message. Id:" << messageId << " CommandId: " << commandId << " Size: " << size; | 369 | SinkTrace() << "Received message. Id:" << messageId << " CommandId: " << commandId << " Size: " << size; |
370 | 370 | ||
371 | // TODO: reject messages above a certain size? | 371 | // TODO: reject messages above a certain size? |
diff --git a/common/listener.h b/common/listener.h index 38e87da..8a1de8a 100644 --- a/common/listener.h +++ b/common/listener.h | |||
@@ -56,7 +56,7 @@ class SINK_EXPORT Listener : public QObject | |||
56 | { | 56 | { |
57 | Q_OBJECT | 57 | Q_OBJECT |
58 | public: | 58 | public: |
59 | Listener(const QByteArray &resourceName, const QByteArray &resourceType, QObject *parent = 0); | 59 | Listener(const QByteArray &resourceName, const QByteArray &resourceType, QObject *parent = nullptr); |
60 | ~Listener(); | 60 | ~Listener(); |
61 | 61 | ||
62 | void checkForUpgrade(); | 62 | void checkForUpgrade(); |
diff --git a/common/resource.cpp b/common/resource.cpp index 6db5510..cd0c4e0 100644 --- a/common/resource.cpp +++ b/common/resource.cpp | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | namespace Sink { | 31 | namespace Sink { |
32 | 32 | ||
33 | Resource::Resource() : QObject(), d(0) | 33 | Resource::Resource() : QObject(), d(nullptr) |
34 | { | 34 | { |
35 | Q_UNUSED(d); | 35 | Q_UNUSED(d); |
36 | } | 36 | } |
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 20bb632..6863193 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <QTime> | 48 | #include <QTime> |
49 | #include <QStandardPaths> | 49 | #include <QStandardPaths> |
50 | 50 | ||
51 | static void queuedInvoke(const std::function<void()> &f, QObject *context = 0) | 51 | static void queuedInvoke(const std::function<void()> &f, QObject *context = nullptr) |
52 | { | 52 | { |
53 | auto timer = QSharedPointer<QTimer>::create(); | 53 | auto timer = QSharedPointer<QTimer>::create(); |
54 | timer->setSingleShot(true); | 54 | timer->setSingleShot(true); |
@@ -605,8 +605,8 @@ bool ResourceAccess::processMessageBuffer() | |||
605 | } | 605 | } |
606 | 606 | ||
607 | // const uint messageId = *(int*)(d->partialMessageBuffer.constData()); | 607 | // const uint messageId = *(int*)(d->partialMessageBuffer.constData()); |
608 | const int commandId = *(int *)(d->partialMessageBuffer.constData() + sizeof(uint)); | 608 | const int commandId = *(const int *)(d->partialMessageBuffer.constData() + sizeof(uint)); |
609 | const uint size = *(int *)(d->partialMessageBuffer.constData() + sizeof(int) + sizeof(uint)); | 609 | const uint size = *(const int *)(d->partialMessageBuffer.constData() + sizeof(int) + sizeof(uint)); |
610 | 610 | ||
611 | if (size > (uint)(d->partialMessageBuffer.size() - headerSize)) { | 611 | if (size > (uint)(d->partialMessageBuffer.size() - headerSize)) { |
612 | SinkWarning() << "command too small"; | 612 | SinkWarning() << "command too small"; |
@@ -690,7 +690,7 @@ ResourceAccessFactory::ResourceAccessFactory() | |||
690 | 690 | ||
691 | ResourceAccessFactory &ResourceAccessFactory::instance() | 691 | ResourceAccessFactory &ResourceAccessFactory::instance() |
692 | { | 692 | { |
693 | static ResourceAccessFactory *instance = 0; | 693 | static ResourceAccessFactory *instance = nullptr; |
694 | if (!instance) { | 694 | if (!instance) { |
695 | instance = new ResourceAccessFactory; | 695 | instance = new ResourceAccessFactory; |
696 | } | 696 | } |
diff --git a/common/resourcefacade.cpp b/common/resourcefacade.cpp index 3dba3e5..7998692 100644 --- a/common/resourcefacade.cpp +++ b/common/resourcefacade.cpp | |||
@@ -110,7 +110,7 @@ LocalStorageQueryRunner<DomainType>::LocalStorageQueryRunner(const Query &query, | |||
110 | }; | 110 | }; |
111 | 111 | ||
112 | QObject *guard = new QObject; | 112 | QObject *guard = new QObject; |
113 | mResultProvider->setFetcher([this, query, guard, &configNotifier, matchesTypeAndIds]() { | 113 | mResultProvider->setFetcher([this, query, matchesTypeAndIds]() { |
114 | const auto entries = mConfigStore.getEntries(); | 114 | const auto entries = mConfigStore.getEntries(); |
115 | for (const auto &res : entries.keys()) { | 115 | for (const auto &res : entries.keys()) { |
116 | const auto type = entries.value(res); | 116 | const auto type = entries.value(res); |
@@ -371,7 +371,7 @@ QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename ApplicationDomain | |||
371 | monitoredResources->insert(resource.identifier()); | 371 | monitoredResources->insert(resource.identifier()); |
372 | } | 372 | } |
373 | }; | 373 | }; |
374 | runner->setStatusUpdater([this, runner, monitoredResources, ctx, monitorResource](ApplicationDomain::SinkAccount &account) { | 374 | runner->setStatusUpdater([runner, monitoredResources, ctx, monitorResource](ApplicationDomain::SinkAccount &account) { |
375 | Query query{Query::LiveQuery}; | 375 | Query query{Query::LiveQuery}; |
376 | query.filter<ApplicationDomain::SinkResource::Account>(account.identifier()); | 376 | query.filter<ApplicationDomain::SinkResource::Account>(account.identifier()); |
377 | query.request<ApplicationDomain::SinkResource::Account>() | 377 | query.request<ApplicationDomain::SinkResource::Account>() |
diff --git a/common/resultprovider.h b/common/resultprovider.h index 87d650f..4655432 100644 --- a/common/resultprovider.h +++ b/common/resultprovider.h | |||
@@ -343,7 +343,7 @@ class AggregatingResultEmitter : public ResultEmitter<DomainType> | |||
343 | public: | 343 | public: |
344 | typedef QSharedPointer<AggregatingResultEmitter<DomainType>> Ptr; | 344 | typedef QSharedPointer<AggregatingResultEmitter<DomainType>> Ptr; |
345 | 345 | ||
346 | ~AggregatingResultEmitter() | 346 | ~AggregatingResultEmitter() Q_DECL_OVERRIDE |
347 | { | 347 | { |
348 | } | 348 | } |
349 | 349 | ||
diff --git a/common/resultset.cpp b/common/resultset.cpp index b82b14d..08954c9 100644 --- a/common/resultset.cpp +++ b/common/resultset.cpp | |||
@@ -103,7 +103,7 @@ ResultSet::ReplayResult ResultSet::replaySet(int offset, int batchSize, const Ca | |||
103 | skip(offset); | 103 | skip(offset); |
104 | int counter = 0; | 104 | int counter = 0; |
105 | while (!batchSize || (counter < batchSize)) { | 105 | while (!batchSize || (counter < batchSize)) { |
106 | const bool ret = next([this, &counter, callback](const ResultSet::Result &result) { | 106 | const bool ret = next([&counter, callback](const ResultSet::Result &result) { |
107 | counter++; | 107 | counter++; |
108 | callback(result); | 108 | callback(result); |
109 | }); | 109 | }); |
diff --git a/common/synchronizer.h b/common/synchronizer.h index 590b939..ff25a08 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h | |||
@@ -42,7 +42,7 @@ class SINK_EXPORT Synchronizer : public ChangeReplay | |||
42 | Q_OBJECT | 42 | Q_OBJECT |
43 | public: | 43 | public: |
44 | Synchronizer(const Sink::ResourceContext &resourceContext); | 44 | Synchronizer(const Sink::ResourceContext &resourceContext); |
45 | virtual ~Synchronizer(); | 45 | virtual ~Synchronizer() Q_DECL_OVERRIDE; |
46 | 46 | ||
47 | void setup(const std::function<void(int commandId, const QByteArray &data)> &enqueueCommandCallback, MessageQueue &messageQueue); | 47 | void setup(const std::function<void(int commandId, const QByteArray &data)> &enqueueCommandCallback, MessageQueue &messageQueue); |
48 | void synchronize(const Sink::QueryBase &query); | 48 | void synchronize(const Sink::QueryBase &query); |
diff --git a/common/test.cpp b/common/test.cpp index 52d79ca..90dc0b6 100644 --- a/common/test.cpp +++ b/common/test.cpp | |||
@@ -113,7 +113,7 @@ public: | |||
113 | }); | 113 | }); |
114 | return facade; | 114 | return facade; |
115 | } | 115 | } |
116 | ~TestFacade(){}; | 116 | ~TestFacade() Q_DECL_OVERRIDE {}; |
117 | KAsync::Job<void> create(const T &domainObject) Q_DECL_OVERRIDE | 117 | KAsync::Job<void> create(const T &domainObject) Q_DECL_OVERRIDE |
118 | { | 118 | { |
119 | mTestAccount->addEntity<T>(T::Ptr::create(domainObject)); | 119 | mTestAccount->addEntity<T>(T::Ptr::create(domainObject)); |
@@ -158,8 +158,7 @@ public: | |||
158 | } | 158 | } |
159 | resultProvider->initialResultSetComplete(true); | 159 | resultProvider->initialResultSetComplete(true); |
160 | }); | 160 | }); |
161 | auto job = KAsync::start([query, resultProvider]() {}); | 161 | return qMakePair(KAsync::null(), emitter); |
162 | return qMakePair(job, emitter); | ||
163 | } | 162 | } |
164 | 163 | ||
165 | Test::TestAccount *mTestAccount; | 164 | Test::TestAccount *mTestAccount; |
diff --git a/tests/hawd/dataset.cpp b/tests/hawd/dataset.cpp index 3325850..0d3047f 100644 --- a/tests/hawd/dataset.cpp +++ b/tests/hawd/dataset.cpp | |||
@@ -297,7 +297,7 @@ void Dataset::eachRow(const std::function<void(const Row &row)> &resultHandler) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | row.fromBinary(value); | 299 | row.fromBinary(value); |
300 | row.m_key = *(qint64 *)key.data(); | 300 | row.m_key = *(const qint64 *)key.data(); |
301 | resultHandler(row); | 301 | resultHandler(row); |
302 | return true; | 302 | return true; |
303 | }, | 303 | }, |
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index 3368549..802947f 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -198,7 +198,7 @@ private slots: | |||
198 | QList<QFuture<void>> futures; | 198 | QList<QFuture<void>> futures; |
199 | const int concurrencyLevel = 20; | 199 | const int concurrencyLevel = 20; |
200 | for (int num = 0; num < concurrencyLevel; num++) { | 200 | for (int num = 0; num < concurrencyLevel; num++) { |
201 | futures << QtConcurrent::run([this, count, &error]() { | 201 | futures << QtConcurrent::run([this, &error]() { |
202 | Sink::Storage::DataStore storage(testDataPath, dbName, Sink::Storage::DataStore::ReadOnly); | 202 | Sink::Storage::DataStore storage(testDataPath, dbName, Sink::Storage::DataStore::ReadOnly); |
203 | Sink::Storage::DataStore storage2(testDataPath, dbName + "2", Sink::Storage::DataStore::ReadOnly); | 203 | Sink::Storage::DataStore storage2(testDataPath, dbName + "2", Sink::Storage::DataStore::ReadOnly); |
204 | for (int i = 0; i < count; i++) { | 204 | for (int i = 0; i < count; i++) { |