Commit 5aee7613 authored by pvuorela's avatar pvuorela

Merge branch 'overrides_mer' into 'master'

[qtcontacts-sqlite] Add `override` to virtual methods

See merge request mer-core/qtcontacts-sqlite!23
parents b742eb0f 2277af45
...@@ -127,7 +127,7 @@ public: ...@@ -127,7 +127,7 @@ public:
return m_request; return m_request;
} }
void clear() void clear() override
{ {
m_request = 0; m_request = 0;
} }
...@@ -137,7 +137,7 @@ public: ...@@ -137,7 +137,7 @@ public:
return m_error; return m_error;
} }
void setError(QContactManager::Error error) void setError(QContactManager::Error error) override
{ {
m_error = error; m_error = error;
} }
...@@ -157,18 +157,18 @@ public: ...@@ -157,18 +157,18 @@ public:
{ {
} }
void execute(ContactReader *, WriterProxy &writer) void execute(ContactReader *, WriterProxy &writer) override
{ {
m_error = writer->save(&m_contacts, m_definitionMask, 0, &m_errorMap, false, false, false); m_error = writer->save(&m_contacts, m_definitionMask, 0, &m_errorMap, false, false, false);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateContactSaveRequest( QContactManagerEngine::updateContactSaveRequest(
m_request, m_contacts, m_error, m_errorMap, state); m_request, m_contacts, m_error, m_errorMap, state);
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Save")); QString s(QLatin1String("Save"));
foreach (const QContact &c, m_contacts) { foreach (const QContact &c, m_contacts) {
...@@ -192,13 +192,13 @@ public: ...@@ -192,13 +192,13 @@ public:
{ {
} }
void execute(ContactReader *, WriterProxy &writer) void execute(ContactReader *, WriterProxy &writer) override
{ {
m_errorMap.clear(); m_errorMap.clear();
m_error = writer->remove(m_contactIds, &m_errorMap, false); m_error = writer->remove(m_contactIds, &m_errorMap, false);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateContactRemoveRequest( QContactManagerEngine::updateContactRemoveRequest(
m_request, m_request,
...@@ -207,7 +207,7 @@ public: ...@@ -207,7 +207,7 @@ public:
state); state);
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Remove")); QString s(QLatin1String("Remove"));
foreach (const QContactId &id, m_contactIds) { foreach (const QContactId &id, m_contactIds) {
...@@ -232,7 +232,7 @@ public: ...@@ -232,7 +232,7 @@ public:
{ {
} }
void execute(ContactReader *reader, WriterProxy &) void execute(ContactReader *reader, WriterProxy &) override
{ {
QList<QContact> contacts; QList<QContact> contacts;
m_error = reader->readContacts( m_error = reader->readContacts(
...@@ -243,7 +243,7 @@ public: ...@@ -243,7 +243,7 @@ public:
m_fetchHint); m_fetchHint);
} }
void update(QMutex *mutex) void update(QMutex *mutex) override
{ {
QList<QContact> contacts; { QList<QContact> contacts; {
QMutexLocker locker(mutex); QMutexLocker locker(mutex);
...@@ -256,17 +256,17 @@ public: ...@@ -256,17 +256,17 @@ public:
QContactAbstractRequest::ActiveState); QContactAbstractRequest::ActiveState);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateContactFetchRequest(m_request, m_contacts, m_error, state); QContactManagerEngine::updateContactFetchRequest(m_request, m_contacts, m_error, state);
} }
void contactsAvailable(const QList<QContact> &contacts) void contactsAvailable(const QList<QContact> &contacts) override
{ {
m_contacts = contacts; m_contacts = contacts;
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Fetch")); QString s(QLatin1String("Fetch"));
return s; return s;
...@@ -289,13 +289,13 @@ public: ...@@ -289,13 +289,13 @@ public:
{ {
} }
void execute(ContactReader *reader, WriterProxy &) void execute(ContactReader *reader, WriterProxy &) override
{ {
QList<QContactId> contactIds; QList<QContactId> contactIds;
m_error = reader->readContactIds(&contactIds, m_filter, m_sorting); m_error = reader->readContactIds(&contactIds, m_filter, m_sorting);
} }
void update(QMutex *mutex) void update(QMutex *mutex) override
{ {
QList<QContactId> contactIds; QList<QContactId> contactIds;
{ {
...@@ -309,18 +309,18 @@ public: ...@@ -309,18 +309,18 @@ public:
QContactAbstractRequest::ActiveState); QContactAbstractRequest::ActiveState);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateContactIdFetchRequest( QContactManagerEngine::updateContactIdFetchRequest(
m_request, m_contactIds, m_error, state); m_request, m_contactIds, m_error, state);
} }
void contactIdsAvailable(const QList<QContactId> &contactIds) void contactIdsAvailable(const QList<QContactId> &contactIds) override
{ {
m_contactIds = contactIds; m_contactIds = contactIds;
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Fetch IDs")); QString s(QLatin1String("Fetch IDs"));
return s; return s;
...@@ -342,7 +342,7 @@ public: ...@@ -342,7 +342,7 @@ public:
{ {
} }
void execute(ContactReader *reader, WriterProxy &) void execute(ContactReader *reader, WriterProxy &) override
{ {
QList<QContact> contacts; QList<QContact> contacts;
m_error = reader->readContacts( m_error = reader->readContacts(
...@@ -352,7 +352,7 @@ public: ...@@ -352,7 +352,7 @@ public:
m_fetchHint); m_fetchHint);
} }
void update(QMutex *mutex) void update(QMutex *mutex) override
{ {
QList<QContact> contacts; QList<QContact> contacts;
{ {
...@@ -367,7 +367,7 @@ public: ...@@ -367,7 +367,7 @@ public:
QContactAbstractRequest::ActiveState); QContactAbstractRequest::ActiveState);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateContactFetchByIdRequest( QContactManagerEngine::updateContactFetchByIdRequest(
m_request, m_request,
...@@ -377,12 +377,12 @@ public: ...@@ -377,12 +377,12 @@ public:
state); state);
} }
void contactsAvailable(const QList<QContact> &contacts) void contactsAvailable(const QList<QContact> &contacts) override
{ {
m_contacts = contacts; m_contacts = contacts;
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("FetchByID")); QString s(QLatin1String("FetchByID"));
foreach (const QContactId &id, m_contactIds) { foreach (const QContactId &id, m_contactIds) {
...@@ -407,18 +407,18 @@ public: ...@@ -407,18 +407,18 @@ public:
{ {
} }
void execute(ContactReader *, WriterProxy &writer) void execute(ContactReader *, WriterProxy &writer) override
{ {
m_error = writer->save(m_relationships, &m_errorMap, false, false); m_error = writer->save(m_relationships, &m_errorMap, false, false);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateRelationshipSaveRequest( QContactManagerEngine::updateRelationshipSaveRequest(
m_request, m_relationships, m_error, m_errorMap, state); m_request, m_relationships, m_error, m_errorMap, state);
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Relationship Save")); QString s(QLatin1String("Relationship Save"));
return s; return s;
...@@ -438,18 +438,18 @@ public: ...@@ -438,18 +438,18 @@ public:
{ {
} }
void execute(ContactReader *, WriterProxy &writer) void execute(ContactReader *, WriterProxy &writer) override
{ {
m_error = writer->remove(m_relationships, &m_errorMap, false); m_error = writer->remove(m_relationships, &m_errorMap, false);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateRelationshipRemoveRequest( QContactManagerEngine::updateRelationshipRemoveRequest(
m_request, m_error, m_errorMap, state); m_request, m_error, m_errorMap, state);
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Relationship Remove")); QString s(QLatin1String("Relationship Remove"));
return s; return s;
...@@ -471,7 +471,7 @@ public: ...@@ -471,7 +471,7 @@ public:
{ {
} }
void execute(ContactReader *reader, WriterProxy &) void execute(ContactReader *reader, WriterProxy &) override
{ {
m_error = reader->readRelationships( m_error = reader->readRelationships(
&m_relationships, &m_relationships,
...@@ -480,13 +480,13 @@ public: ...@@ -480,13 +480,13 @@ public:
m_second); m_second);
} }
void updateState(QContactAbstractRequest::State state) void updateState(QContactAbstractRequest::State state) override
{ {
QContactManagerEngine::updateRelationshipFetchRequest( QContactManagerEngine::updateRelationshipFetchRequest(
m_request, m_relationships, m_error, state); m_request, m_relationships, m_error, state);
} }
QString description() const QString description() const override
{ {
QString s(QLatin1String("Relationship Fetch")); QString s(QLatin1String("Relationship Fetch"));
return s; return s;
...@@ -757,12 +757,12 @@ public: ...@@ -757,12 +757,12 @@ public:
{ {
} }
void contactsAvailable(const QList<QContact> &contacts) void contactsAvailable(const QList<QContact> &contacts) override
{ {
m_thread->contactsAvailable(contacts); m_thread->contactsAvailable(contacts);
} }
void contactIdsAvailable(const QList<QContactId> &contactIds) void contactIdsAvailable(const QList<QContactId> &contactIds) override
{ {
m_thread->contactIdsAvailable(contactIds); m_thread->contactIdsAvailable(contactIds);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment