Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[qtcontacts-sqlite] Mark method overrides
Add the "override" keyword to virtual method implementations. This will
turn out to be helpful when upgrading to a new QtPim version: since
sometimes QtPim changes the signature of virtual methods, the override
keyword guarantees that we'll get an error when our methods stop being
called.
  • Loading branch information
mardy committed Nov 13, 2017
1 parent 3f3577e commit 99358cf
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/engine/contactsengine.h
Expand Up @@ -70,22 +70,22 @@ class ContactsEngine : public QtContactsSqliteExtensions::ContactManagerEngine
QList<QContactId> contactIds(
const QContactFilter &filter,
const QList<QContactSortOrder> &sortOrders,
QContactManager::Error* error) const;
QContactManager::Error* error) const override;
QList<QContact> contacts(
const QList<QContactId> &localIds,
const QContactFetchHint &fetchHint,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error *error) const;
QContactManager::Error *error) const override;
QContact contact(
const QContactId &contactId,
const QContactFetchHint &fetchHint,
QContactManager::Error* error) const;
QContactManager::Error* error) const override;

QList<QContact> contacts(
const QContactFilter &filter,
const QList<QContactSortOrder> &sortOrders,
const QContactFetchHint &fetchHint,
QContactManager::Error* error) const;
QContactManager::Error* error) const override;
QList<QContact> contacts(
const QContactFilter &filter,
const QList<QContactSortOrder> &sortOrders,
Expand All @@ -95,42 +95,42 @@ class ContactsEngine : public QtContactsSqliteExtensions::ContactManagerEngine
bool saveContacts(
QList<QContact> *contacts,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error *error);
QContactManager::Error *error) override;
bool saveContacts(
QList<QContact> *contacts,
const ContactWriter::DetailList &definitionMask,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error *error);
QContactManager::Error *error) override;
bool removeContact(const QContactId& contactId, QContactManager::Error* error);
bool removeContacts(
const QList<QContactId> &contactIds,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error* error);
QContactManager::Error* error) override;

QContactId selfContactId(QContactManager::Error* error) const;
bool setSelfContactId(const QContactId& contactId, QContactManager::Error* error);
QContactId selfContactId(QContactManager::Error* error) const override;
bool setSelfContactId(const QContactId& contactId, QContactManager::Error* error) override;

QList<QContactRelationship> relationships(
const QString &relationshipType,
const QContact &participant,
QContactRelationship::Role role,
QContactManager::Error *error) const;
QContactManager::Error *error) const override;
bool saveRelationships(
QList<QContactRelationship> *relationships,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error *error);
QContactManager::Error *error) override;
bool removeRelationships(
const QList<QContactRelationship> &relationships,
QMap<int, QContactManager::Error> *errorMap,
QContactManager::Error *error);
QContactManager::Error *error) override;

void requestDestroyed(QContactAbstractRequest* req);
bool startRequest(QContactAbstractRequest* req);
bool cancelRequest(QContactAbstractRequest* req);
bool waitForRequestFinished(QContactAbstractRequest* req, int msecs);
void requestDestroyed(QContactAbstractRequest* req) override;
bool startRequest(QContactAbstractRequest* req) override;
bool cancelRequest(QContactAbstractRequest* req) override;
bool waitForRequestFinished(QContactAbstractRequest* req, int msecs) override;

bool isRelationshipTypeSupported(const QString &relationshipType, QContactType::TypeValues contactType) const;
QList<QContactType::TypeValues> supportedContactTypes() const;
bool isRelationshipTypeSupported(const QString &relationshipType, QContactType::TypeValues contactType) const override;
QList<QContactType::TypeValues> supportedContactTypes() const override;

void regenerateDisplayLabel(QContact &contact) const;

Expand Down

0 comments on commit 99358cf

Please sign in to comment.