Commit 110641b2 authored by Laurent Montel's avatar Laurent Montel 😁

Use override here

parent 4bc8fd9e
......@@ -32,11 +32,11 @@ public:
explicit IncidenceAttribute();
~IncidenceAttribute();
QByteArray type() const Q_DECL_OVERRIDE;
Attribute *clone() const Q_DECL_OVERRIDE;
QByteArray type() const override;
Attribute *clone() const override;
QByteArray serialized() const Q_DECL_OVERRIDE;
void deserialize(const QByteArray &data) Q_DECL_OVERRIDE;
QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
/**
* The status the invitation is in.
......
......@@ -65,7 +65,7 @@ public:
Akonadi::Collection collection() const;
public Q_SLOTS:
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
private Q_SLOTS:
void initStart();
......@@ -76,7 +76,7 @@ private:
const KCalCore::MemoryCalendar::Ptr &calendar,
const Akonadi::Item &item);
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
private:
QString m_resourceId;
......
......@@ -42,7 +42,7 @@ public:
~MailDispatcherAgent();
public Q_SLOTS:
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
Q_SIGNALS:
/**
......@@ -56,7 +56,7 @@ Q_SIGNALS:
Q_SCRIPTABLE void itemDispatchStarted();
protected:
void doSetOnline(bool online) Q_DECL_OVERRIDE;
void doSetOnline(bool online) override;
private:
//@cond PRIVATE
......
......@@ -55,7 +55,7 @@ public:
/**
* Starts the job.
*/
void start() Q_DECL_OVERRIDE;
void start() override;
/**
* If this function is called before the job is started, the SendJob will
......
......@@ -60,7 +60,7 @@ public:
protected:
// reimpl from TransactionSequence
void doStart() Q_DECL_OVERRIDE;
void doStart() override;
private:
//@cond PRIVATE
......
......@@ -34,14 +34,14 @@ class DummyMigrator : public MigratorBase
public:
explicit DummyMigrator(const QString &identifier);
QString displayName() const Q_DECL_OVERRIDE;
void startWork() Q_DECL_OVERRIDE;
QString displayName() const override;
void startWork() override;
bool shouldAutostart() const Q_DECL_OVERRIDE;
bool canStart() Q_DECL_OVERRIDE;
void pause() Q_DECL_OVERRIDE;
bool shouldAutostart() const override;
bool canStart() override;
void pause() override;
void abort() Q_DECL_OVERRIDE;
void abort() override;
private Q_SLOTS:
void onTimerElapsed();
};
......
......@@ -37,15 +37,15 @@ public:
MigratorBase(QLatin1String("testmigrator") + identifier, QString(), QString(), parent), mAutostart(false)
{}
QString displayName() const Q_DECL_OVERRIDE
QString displayName() const override
{
return QStringLiteral("name");
}
void startWork() Q_DECL_OVERRIDE
void startWork() override
{}
void abort() Q_DECL_OVERRIDE {
void abort() override {
setMigrationState(Aborted);
}
......@@ -54,16 +54,16 @@ public:
setMigrationState(Complete);
}
bool shouldAutostart() const Q_DECL_OVERRIDE
bool shouldAutostart() const override
{
return mAutostart;
}
void pause() Q_DECL_OVERRIDE {
void pause() override {
setMigrationState(Paused);
}
void resume() Q_DECL_OVERRIDE {
void resume() override {
setMigrationState(InProgress);
}
......@@ -76,20 +76,20 @@ public:
TestJobTracker() : mPercent(0)
{}
void registerJob(KJob *job) Q_DECL_OVERRIDE {
void registerJob(KJob *job) override {
KJobTrackerInterface::registerJob(job);
mJobs << job;
}
void unregisterJob(KJob *job) Q_DECL_OVERRIDE {
void unregisterJob(KJob *job) override {
mJobs.removeAll(job);
}
void finished(KJob *job) Q_DECL_OVERRIDE {
void finished(KJob *job) override {
mJobs.removeAll(job);
}
void percent(KJob *job, long unsigned int percent) Q_DECL_OVERRIDE {
void percent(KJob *job, long unsigned int percent) override {
Q_UNUSED(job);
mPercent = percent;
}
......
......@@ -33,7 +33,7 @@ class MigrationAgent : public AgentBase, public AgentBase::ObserverV2
Q_OBJECT
public:
explicit MigrationAgent(const QString &id);
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
private:
MigrationScheduler mScheduler;
};
......
......@@ -40,11 +40,11 @@ class MigrationExecutor : public KJob
public:
MigrationExecutor();
void add(const QSharedPointer<MigratorBase> &);
void start() Q_DECL_OVERRIDE;
void start() override;
protected:
bool doResume() Q_DECL_OVERRIDE;
bool doSuspend() Q_DECL_OVERRIDE;
bool doResume() override;
bool doSuspend() override;
private Q_SLOTS:
void onStoppedProcessing();
......
......@@ -71,12 +71,12 @@ public:
};
bool addMigrator(const QSharedPointer<MigratorBase> &migrator);
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &child) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QSharedPointer<MigratorBase> migrator(const QString &identifier) const;
QList< QSharedPointer<MigratorBase> > migrators() const;
......
......@@ -87,15 +87,15 @@ public:
void setShowButtonToDisplayMail(bool b);
protected:
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &sourceCollection, const Akonadi::Collection &destinationCollection) Q_DECL_OVERRIDE;
void itemsRemoved(const Akonadi::Item::List &items) Q_DECL_OVERRIDE;
void itemsFlagsChanged(const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags, const QSet<QByteArray> &removedFlags) Q_DECL_OVERRIDE;
void doSetOnline(bool online) Q_DECL_OVERRIDE;
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &sourceCollection, const Akonadi::Collection &destinationCollection) override;
void itemsRemoved(const Akonadi::Item::List &items) override;
void itemsFlagsChanged(const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags, const QSet<QByteArray> &removedFlags) override;
void doSetOnline(bool online) override;
private Q_SLOTS:
void slotShowNotifications();
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
void slotInstanceStatusChanged(const Akonadi::AgentInstance &instance);
void slotInstanceRemoved(const Akonadi::AgentInstance &instance);
void slotInstanceAdded(const Akonadi::AgentInstance &instance);
......
......@@ -40,10 +40,10 @@ class NewMailNotifierCollectionProxyModel : public QIdentityProxyModel
public:
explicit NewMailNotifierCollectionProxyModel(QObject *parent = nullptr);
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &_data, int role) Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &_data, int role) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QHash<Akonadi::Collection, bool> notificationCollection() const;
......
......@@ -30,7 +30,7 @@ public:
explicit NewMailNotifierShowMessageJob(Akonadi::Item::Id id, QObject *parent = nullptr);
~NewMailNotifierShowMessageJob();
void start() Q_DECL_OVERRIDE;
void start() override;
private:
Akonadi::Item::Id mId;
......
......@@ -37,22 +37,22 @@ public:
/**
* Reimplemented from SlaveBase
*/
void get(const QUrl &url) Q_DECL_OVERRIDE;
void get(const QUrl &url) override;
/**
* Reimplemented from SlaveBase
*/
void stat(const QUrl &url) Q_DECL_OVERRIDE;
void stat(const QUrl &url) override;
/**
* Reimplemented from SlaveBase
*/
void listDir(const QUrl &url) Q_DECL_OVERRIDE;
void listDir(const QUrl &url) override;
/**
* Reimplemented from SlaveBase
*/
void del(const QUrl &url, bool isFile) Q_DECL_OVERRIDE;
void del(const QUrl &url, bool isFile) override;
private:
static KIO::UDSEntry entryForItem(const Akonadi::Item &item);
......
......@@ -46,12 +46,12 @@ public:
virtual ~ POP3Protocol();
virtual void setHost(const QString &host, quint16 port,
const QString &user, const QString &pass) Q_DECL_OVERRIDE;
const QString &user, const QString &pass) override;
void get(const QUrl &url) Q_DECL_OVERRIDE;
void stat(const QUrl &url) Q_DECL_OVERRIDE;
void del(const QUrl &url, bool isfile) Q_DECL_OVERRIDE;
void listDir(const QUrl &url) Q_DECL_OVERRIDE;
void get(const QUrl &url) override;
void stat(const QUrl &url) override;
void del(const QUrl &url, bool isfile) override;
void listDir(const QUrl &url) override;
protected:
......@@ -95,13 +95,13 @@ protected:
Resp getResponse(char *buf, unsigned int len);
/** Call int pop3_open() and report an error, if if fails */
void openConnection() Q_DECL_OVERRIDE;
void openConnection() override;
/**
* Attempt to properly shut down the POP3 connection by sending
* "QUIT\r\n" before closing the socket.
*/
void closeConnection() Q_DECL_OVERRIDE;
void closeConnection() override;
/**
* Attempt to initiate a POP3 connection via a TCP socket. If no port
......
......@@ -31,7 +31,7 @@ class EntityTreeCreateJob : public Akonadi::TransactionSequence
public:
explicit EntityTreeCreateJob(const QList<Akonadi::Collection::List> &collections, const Akonadi::Item::List &items, QObject *parent = nullptr);
void doStart() Q_DECL_OVERRIDE;
void doStart() override;
private Q_SLOTS:
void collectionCreateJobDone(KJob *);
......
......@@ -49,7 +49,7 @@ public:
*/
virtual ~GidMigrationJob();
void doStart() Q_DECL_OVERRIDE;
void doStart() override;
private Q_SLOTS:
void collectionsReceived(const Akonadi::Collection::List &);
......@@ -72,8 +72,8 @@ public:
explicit UpdateJob(const Akonadi::Collection &col, QObject *parent = nullptr);
virtual ~UpdateJob();
void doStart() Q_DECL_OVERRIDE;
void slotResult(KJob *job) Q_DECL_OVERRIDE;
void doStart() override;
void slotResult(KJob *job) override;
private Q_SLOTS:
void itemsReceived(const Akonadi::Item::List &items);
......
......@@ -30,15 +30,15 @@ public:
GidMigrator(const QString &mimeType);
virtual ~GidMigrator();
QString displayName() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QString displayName() const override;
QString description() const override;
bool canStart() Q_DECL_OVERRIDE;
bool canStart() override;
bool shouldAutostart() const Q_DECL_OVERRIDE;
bool shouldAutostart() const override;
protected:
void startWork() Q_DECL_OVERRIDE;
void startWork() override;
private Q_SLOTS:
void migrationFinished(KJob *);
private:
......
......@@ -41,14 +41,14 @@ class SerializerPluginAddressee : public QObject,
Q_INTERFACES(Akonadi::GidExtractorInterface)
Q_PLUGIN_METADATA(IID "org.kde.akonadi.SerializerPluginAddressee")
public:
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) Q_DECL_OVERRIDE;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) Q_DECL_OVERRIDE;
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) override;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) override;
void compare(Akonadi::AbstractDifferencesReporter *reporter,
const Akonadi::Item &leftItem,
const Akonadi::Item &rightItem) Q_DECL_OVERRIDE;
const Akonadi::Item &rightItem) override;
QString extractGid(const Item &item) const Q_DECL_OVERRIDE;
QString extractGid(const Item &item) const override;
private:
KContacts::VCardConverter m_converter;
......
......@@ -43,14 +43,14 @@ class SerializerPluginContactGroup : public QObject,
Q_INTERFACES(Akonadi::GidExtractorInterface)
Q_PLUGIN_METADATA(IID "org.kde.akonadi.SerializerPluginContactGroup")
public:
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) Q_DECL_OVERRIDE;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) Q_DECL_OVERRIDE;
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) override;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) override;
void compare(Akonadi::AbstractDifferencesReporter *reporter,
const Akonadi::Item &leftItem,
const Akonadi::Item &rightItem) Q_DECL_OVERRIDE;
const Akonadi::Item &rightItem) override;
QString extractGid(const Item &item) const Q_DECL_OVERRIDE;
QString extractGid(const Item &item) const override;
};
}
......
......@@ -47,10 +47,10 @@ class SerializerPluginKAlarm : public QObject,
Q_INTERFACES(Akonadi::GidExtractorInterface)
Q_PLUGIN_METADATA(IID "org.kde.akonadi.SerializerPluginKAlarm")
public:
bool deserialize(Akonadi::Item &item, const QByteArray &label, QIODevice &data, int version) Q_DECL_OVERRIDE;
void serialize(const Akonadi::Item &item, const QByteArray &label, QIODevice &data, int &version) Q_DECL_OVERRIDE;
void compare(Akonadi::AbstractDifferencesReporter *, const Akonadi::Item &left, const Akonadi::Item &right) Q_DECL_OVERRIDE;
QString extractGid(const Akonadi::Item &item) const Q_DECL_OVERRIDE;
bool deserialize(Akonadi::Item &item, const QByteArray &label, QIODevice &data, int version) override;
void serialize(const Akonadi::Item &item, const QByteArray &label, QIODevice &data, int &version) override;
void compare(Akonadi::AbstractDifferencesReporter *, const Akonadi::Item &left, const Akonadi::Item &right) override;
QString extractGid(const Akonadi::Item &item) const override;
private:
void reportDifference(Akonadi::AbstractDifferencesReporter *, KAEventFormatter::Parameter);
......
......@@ -43,14 +43,14 @@ class SerializerPluginKCalCore : public QObject,
Q_PLUGIN_METADATA(IID "org.kde.akonadi.SerializerPluginKCalCore")
public:
SerializerPluginKCalCore();
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) Q_DECL_OVERRIDE;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) Q_DECL_OVERRIDE;
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) override;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) override;
void compare(Akonadi::AbstractDifferencesReporter *reporter,
const Akonadi::Item &leftItem,
const Akonadi::Item &rightItem) Q_DECL_OVERRIDE;
const Akonadi::Item &rightItem) override;
QString extractGid(const Item &item) const Q_DECL_OVERRIDE;
QString extractGid(const Item &item) const override;
private:
KCalCore::ICalFormat mFormat;
......
......@@ -55,10 +55,10 @@ class SerializerPluginMail : public QObject, public ItemSerializerPlugin, public
Q_INTERFACES(Akonadi::ItemSerializerPlugin Akonadi::GidExtractorInterface)
Q_PLUGIN_METADATA(IID "org.kde.akonadi.SerializerPluginMail")
public:
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) Q_DECL_OVERRIDE;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) Q_DECL_OVERRIDE;
QSet<QByteArray> parts(const Item &item) const Q_DECL_OVERRIDE;
QString extractGid(const Item &item) const Q_DECL_OVERRIDE;
bool deserialize(Item &item, const QByteArray &label, QIODevice &data, int version) override;
void serialize(const Item &item, const QByteArray &label, QIODevice &data, int &version) override;
QSet<QByteArray> parts(const Item &item) const override;
QString extractGid(const Item &item) const override;
private:
StringPool m_stringPool;
};
......
......@@ -29,11 +29,11 @@ public:
explicit AkonotesResource(const QString &id);
~AkonotesResource();
QString defaultResourceType() Q_DECL_OVERRIDE;
QString defaultResourceType() override;
public Q_SLOTS:
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
protected:
QString itemMimeType() const Q_DECL_OVERRIDE;
QString itemMimeType() const override;
};
#endif
......@@ -38,15 +38,15 @@ public:
~BirthdaysResource();
public Q_SLOTS:
void configure(WId windowId) Q_DECL_OVERRIDE;
void configure(WId windowId) override;
protected:
using ResourceBase::retrieveItems; // Suppress -Woverload-virtual
protected:
void retrieveCollections() Q_DECL_OVERRIDE;
void retrieveItems(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
bool retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts) Q_DECL_OVERRIDE;
void retrieveCollections() override;
void retrieveItems(const Akonadi::Collection &collection) override;
bool retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts) override;
private:
void addPendingEvent(const KCalCore::Event::Ptr &event, const QString &remoteId);
......
......@@ -42,33 +42,33 @@ public:
~ContactsResource();
public Q_SLOTS:
void configure(WId windowId) Q_DECL_OVERRIDE;
void aboutToQuit() Q_DECL_OVERRIDE;
void configure(WId windowId) override;
void aboutToQuit() override;
protected:
using ResourceBase::retrieveItems; // suppress -Woverload-virtual warnings
protected Q_SLOTS:
void retrieveCollections() Q_DECL_OVERRIDE;
void retrieveItems(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
bool retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts) Q_DECL_OVERRIDE;
void retrieveCollections() override;
void retrieveItems(const Akonadi::Collection &collection) override;
bool retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts) override;
protected:
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
void itemChanged(const Akonadi::Item &item, const QSet<QByteArray> &parts) Q_DECL_OVERRIDE;
void itemRemoved(const Akonadi::Item &item) Q_DECL_OVERRIDE;
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
void itemChanged(const Akonadi::Item &item, const QSet<QByteArray> &parts) override;
void itemRemoved(const Akonadi::Item &item) override;
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) Q_DECL_OVERRIDE;
void collectionChanged(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) override;
void collectionChanged(const Akonadi::Collection &collection) override;
// do not hide the other variant, use implementation from base class
// which just forwards to the one above
using Akonadi::AgentBase::ObserverV2::collectionChanged;
void collectionRemoved(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
void collectionRemoved(const Akonadi::Collection &collection) override;
void itemMoved(const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
const Akonadi::Collection &collectionDestination) Q_DECL_OVERRIDE;
const Akonadi::Collection &collectionDestination) override;
void collectionMoved(const Akonadi::Collection &collection, const Akonadi::Collection &collectionSource,
const Akonadi::Collection &collectionDestination) Q_DECL_OVERRIDE;
const Akonadi::Collection &collectionDestination) override;
private:
Akonadi::Collection::List createCollectionsForDirectory(const QDir &parentDirectory,
......
......@@ -31,10 +31,10 @@ public:
void setCTag(const QString &ctag);
QString CTag() const;
Akonadi::Attribute *clone() const Q_DECL_OVERRIDE;
QByteArray type() const Q_DECL_OVERRIDE;
QByteArray serialized() const Q_DECL_OVERRIDE;
void deserialize(const QByteArray &data) Q_DECL_OVERRIDE;
Akonadi::Attribute *clone() const override;
QByteArray type() const override;
QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
private:
QString mCTag;
......