Commit 80114a97 authored by Laurent Montel's avatar Laurent Montel 😁

Add Q_DECL_OVERRIDE

parent 109c10c2
......@@ -53,18 +53,18 @@ public:
emit Cache::dataAvailable();
}
T retrieve(typename T::Id id) const
T retrieve(typename T::Id id) const Q_DECL_OVERRIDE
{
return m_data.value(id);
}
void request(typename T::Id id, const typename Cache::FetchScope &scope)
void request(typename T::Id id, const typename Cache::FetchScope &scope) Q_DECL_OVERRIDE
{
Q_UNUSED(id)
Q_UNUSED(scope)
}
bool ensureCached(typename T::Id id, const typename Cache::FetchScope &scope)
bool ensureCached(typename T::Id id, const typename Cache::FetchScope &scope) Q_DECL_OVERRIDE
{
Q_UNUSED(scope)
return m_data.contains(id);
......
......@@ -36,7 +36,7 @@ Q_DECLARE_METATYPE(QVector<DbIntrospector::ForeignKey>)
class StatementCollector : public TestInterface
{
public:
virtual void execStatement(const QString &statement)
void execStatement(const QString &statement) Q_DECL_OVERRIDE
{
statements.push_back(statement);
}
......@@ -55,29 +55,29 @@ public:
{
}
virtual bool hasTable(const QString &tableName)
bool hasTable(const QString &tableName) Q_DECL_OVERRIDE
{
Q_UNUSED(tableName);
return m_hasTable;
}
virtual bool hasIndex(const QString &tableName, const QString &indexName)
bool hasIndex(const QString &tableName, const QString &indexName) Q_DECL_OVERRIDE
{
Q_UNUSED(tableName);
Q_UNUSED(indexName);
return m_hasIndex;
}
virtual bool hasColumn(const QString &tableName, const QString &columnName)
bool hasColumn(const QString &tableName, const QString &columnName) Q_DECL_OVERRIDE
{
Q_UNUSED(tableName);
Q_UNUSED(columnName);
return false;
}
virtual bool isTableEmpty(const QString &tableName)
bool isTableEmpty(const QString &tableName) Q_DECL_OVERRIDE
{
Q_UNUSED(tableName);
return m_tableEmpty;
}
virtual QVector< ForeignKey > foreignKeyConstraints(const QString &tableName)
QVector< ForeignKey > foreignKeyConstraints(const QString &tableName) Q_DECL_OVERRIDE
{
Q_UNUSED(tableName);
return m_foreignKeys;
......
......@@ -88,10 +88,10 @@ public:
~FakeAkonadiServer();
/* Reimpl */
bool init();
bool init() Q_DECL_OVERRIDE;
/* Reimpl */
bool quit();
bool quit() Q_DECL_OVERRIDE;
static QString basePath();
static QString socketFile();
......@@ -111,7 +111,7 @@ public:
protected:
/* Reimpl */
void incomingConnection(quintptr socketDescriptor);
void incomingConnection(quintptr socketDescriptor) Q_DECL_OVERRIDE;
private:
explicit FakeAkonadiServer();
......
......@@ -45,7 +45,7 @@ public:
bool isScenarioDone() const;
protected:
void run();
void run() Q_DECL_OVERRIDE;
private Q_SLOTS:
void dataAvailable();
......
......@@ -36,7 +36,7 @@ public:
FakeConnection(QObject *parent = 0);
virtual ~FakeConnection();
DataStore *storageBackend();
DataStore *storageBackend() Q_DECL_OVERRIDE;
public Q_SLOTS:
Akonadi::Server::NotificationCollector *notificationCollector();
......
......@@ -36,13 +36,13 @@ public:
explicit FakeSearchManager(QObject *parent = 0);
virtual ~FakeSearchManager();
void registerInstance(const QString &id);
void unregisterInstance(const QString &id);
void updateSearch(const Collection &collection);
void updateSearchAsync(const Collection &collection);
QVector<AbstractSearchPlugin *> searchPlugins() const;
void registerInstance(const QString &id) Q_DECL_OVERRIDE;
void unregisterInstance(const QString &id) Q_DECL_OVERRIDE;
void updateSearch(const Collection &collection) Q_DECL_OVERRIDE;
void updateSearchAsync(const Collection &collection) Q_DECL_OVERRIDE;
QVector<AbstractSearchPlugin *> searchPlugins() const Q_DECL_OVERRIDE;
void scheduleSearchUpdate();
void scheduleSearchUpdate() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -49,7 +49,7 @@ public:
void configure(qlonglong windowId);
protected:
void run();
void run() Q_DECL_OVERRIDE;
private:
QString m_identifier;
......
......@@ -34,11 +34,11 @@ class AgentProcessInstance : public AgentInstance
public:
explicit AgentProcessInstance(AgentManager *manager);
virtual bool start(const AgentType &agentInfo);
virtual void quit();
virtual void cleanup();
virtual void restartWhenIdle();
virtual void configure(qlonglong windowId);
bool start(const AgentType &agentInfo) Q_DECL_OVERRIDE;
void quit() Q_DECL_OVERRIDE;
void cleanup() Q_DECL_OVERRIDE;
void restartWhenIdle() Q_DECL_OVERRIDE;
void configure(qlonglong windowId) Q_DECL_OVERRIDE;
private Q_SLOTS:
void failedToStart();
......
......@@ -30,10 +30,10 @@ class AgentThreadInstance : public AgentInstance
public:
AgentThreadInstance(AgentManager *manager);
virtual bool start(const AgentType &agentInfo);
virtual void quit();
virtual void restartWhenIdle();
virtual void configure(qlonglong windowId);
bool start(const AgentType &agentInfo) Q_DECL_OVERRIDE;
void quit() Q_DECL_OVERRIDE;
void restartWhenIdle() Q_DECL_OVERRIDE;
void configure(qlonglong windowId) Q_DECL_OVERRIDE;
private Q_SLOTS:
void agentServerRegistered();
......
......@@ -55,7 +55,7 @@ public:
explicit AkonadiBridgeConnection(QTcpSocket *remoteSocket, QObject *parent = 0);
protected:
void connectLocal();
void connectLocal() Q_DECL_OVERRIDE;
};
class DBusBridgeConnection : public BridgeConnection
......@@ -66,7 +66,7 @@ public:
explicit DBusBridgeConnection(QTcpSocket *remoteSocket, QObject *parent = 0);
protected:
void connectLocal();
void connectLocal() Q_DECL_OVERRIDE;
};
#endif // BRIDGECONNECTION_H
......@@ -47,7 +47,7 @@ public:
}
protected:
void slotNewConnection()
void slotNewConnection() Q_DECL_OVERRIDE
{
while (m_server->hasPendingConnections()) {
new ConnectionType(m_server->nextPendingConnection(), this);
......
......@@ -71,7 +71,7 @@ private Q_SLOTS:
protected:
/** reimpl */
virtual void incomingConnection(quintptr socketDescriptor);
void incomingConnection(quintptr socketDescriptor) Q_DECL_OVERRIDE;
private:
bool startDatabaseProcess();
......
......@@ -71,10 +71,10 @@ public:
~CacheCleaner();
protected:
void collectionExpired(const Collection &collection);
int collectionScheduleInterval(const Collection &collection);
bool hasChanged(const Collection &collection, const Collection &changed);
bool shouldScheduleCollection(const Collection &collection);
void collectionExpired(const Collection &collection) Q_DECL_OVERRIDE;
int collectionScheduleInterval(const Collection &collection) Q_DECL_OVERRIDE;
bool hasChanged(const Collection &collection, const Collection &changed) Q_DECL_OVERRIDE;
bool shouldScheduleCollection(const Collection &collection) Q_DECL_OVERRIDE;
private:
static CacheCleaner *sInstance;
......
......@@ -38,13 +38,13 @@ public:
DBusTracer();
virtual ~DBusTracer();
virtual void beginConnection(const QString &identifier, const QString &msg);
virtual void endConnection(const QString &identifier, const QString &msg);
virtual void connectionInput(const QString &identifier, const QByteArray &msg);
virtual void connectionOutput(const QString &identifier, const QByteArray &msg);
virtual void signal(const QString &signalName, const QString &msg);
virtual void warning(const QString &componentName, const QString &msg);
virtual void error(const QString &componentName, const QString &msg);
void beginConnection(const QString &identifier, const QString &msg) Q_DECL_OVERRIDE;
void endConnection(const QString &identifier, const QString &msg) Q_DECL_OVERRIDE;
void connectionInput(const QString &identifier, const QByteArray &msg) Q_DECL_OVERRIDE;
void connectionOutput(const QString &identifier, const QByteArray &msg) Q_DECL_OVERRIDE;
void signal(const QString &signalName, const QString &msg) Q_DECL_OVERRIDE;
void warning(const QString &componentName, const QString &msg) Q_DECL_OVERRIDE;
void error(const QString &componentName, const QString &msg) Q_DECL_OVERRIDE;
Q_SIGNALS:
void connectionStarted(const QString &identifier, const QString &msg);
......
......@@ -37,7 +37,7 @@ class AkAppend : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
bool buildPimItem(const Protocol::CreateItemCommand &cmd,
......
......@@ -54,7 +54,7 @@ class Copy : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
protected:
/**
......
......@@ -37,7 +37,7 @@ class Create : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -39,7 +39,7 @@ class Delete : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
bool deleteRecursive(Collection &col);
......
......@@ -34,7 +34,7 @@ class Fetch : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -37,7 +37,7 @@ class Link : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -88,7 +88,7 @@ class List : public Handler
public:
List();
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
void listCollection(const Collection &root,
......
......@@ -33,7 +33,7 @@ class Login : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -33,7 +33,7 @@ class Logout : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
......
......@@ -37,7 +37,7 @@ class Modify : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -42,7 +42,7 @@ class Move : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -34,7 +34,7 @@ class RelationFetch : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -29,7 +29,7 @@ class RelationRemove : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -34,7 +34,7 @@ class RelationStore : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
Relation fetchRelation(qint64 leftId, qint64 rightId, qint64 typeId);
......
......@@ -48,7 +48,7 @@ class Remove : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -39,7 +39,7 @@ class ResourceSelect : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -38,7 +38,7 @@ class Search : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private Q_SLOTS:
void slotResultsAvailable(const QSet<qint64> &results);
......
......@@ -34,7 +34,7 @@ class SearchPersistent : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -35,7 +35,7 @@ class SearchResult : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
bool fail(const QByteArray &searchId, const QString &error);
......
......@@ -33,7 +33,7 @@ class Status : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -96,7 +96,7 @@ class Store : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
private:
bool replaceFlags(const PimItem::List &items, const QSet<QByteArray> &flags, bool &flagsChanged);
......
......@@ -30,7 +30,7 @@ class TagAppend : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -34,7 +34,7 @@ class TagFetch : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -29,7 +29,7 @@ class TagRemove : public Handler
{
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -30,7 +30,7 @@ class TagStore : public Handler
Q_OBJECT
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -36,7 +36,7 @@ class TransactionHandler : public Handler
Q_ENUMS(Mode)
public:
bool parseStream();
bool parseStream() Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -48,12 +48,12 @@ public:
void requestCollectionSync(const Collection &collection);
protected:
int collectionScheduleInterval(const Collection &collection);
bool hasChanged(const Collection &collection, const Collection &changed);
bool shouldScheduleCollection(const Collection &collection);
int collectionScheduleInterval(const Collection &collection) Q_DECL_OVERRIDE;
bool hasChanged(const Collection &collection, const Collection &changed) Q_DECL_OVERRIDE;
bool shouldScheduleCollection(const Collection &collection) Q_DECL_OVERRIDE;
protected Q_SLOTS:
void collectionExpired(const Collection &collection);
void collectionExpired(const Collection &collection) Q_DECL_OVERRIDE;
private:
QHash<int, QDateTime> mLastChecks;
......
......@@ -35,43 +35,43 @@ public:
{
}
virtual void beginConnection(const QString &identifier, const QString &msg)
void beginConnection(const QString &identifier, const QString &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(identifier);
Q_UNUSED(msg);
}
virtual void endConnection(const QString &identifier, const QString &msg)
void endConnection(const QString &identifier, const QString &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(identifier);
Q_UNUSED(msg);
}
virtual void connectionInput(const QString &identifier, const QByteArray &msg)
void connectionInput(const QString &identifier, const QByteArray &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(identifier);
Q_UNUSED(msg);
}
virtual void connectionOutput(const QString &identifier, const QByteArray &msg)
void connectionOutput(const QString &identifier, const QByteArray &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(identifier);
Q_UNUSED(msg);
}
virtual void signal(const QString &signalName, const QString &msg)
void signal(const QString &signalName, const QString &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(signalName);
Q_UNUSED(msg);
}
virtual void warning(const QString &componentName, const QString &msg)
void warning(const QString &componentName, const QString &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(componentName);
Q_UNUSED(msg);
}
virtual void error(const QString &componentName, const QString &msg)
void error(const QString &componentName, const QString &msg) Q_DECL_OVERRIDE
{
Q_UNUSED(componentName);
Q_UNUSED(msg);
......
......@@ -29,8 +29,8 @@ namespace Server {
class AgentSearchEngine : public AbstractSearchEngine
{
public:
virtual void addSearch(const Collection &collection);
virtual void removeSearch(qint64 id);
void addSearch(const Collection &collection) Q_DECL_OVERRIDE;
void removeSearch(qint64 id) Q_DECL_OVERRIDE;
};
} // namespace Server
......
......@@ -35,12 +35,12 @@ public:
/**
* Returns the name of the used driver.
*/
virtual QString driverName() const;
QString driverName() const Q_DECL_OVERRIDE;
/**
* Returns the database name.
*/
virtual QString databaseName() const;
QString databaseName() const Q_DECL_OVERRIDE;
/**
* This method is called whenever the Akonadi server is started
......@@ -49,31 +49,31 @@ public:
* At this point the default settings should be determined, merged
* with the given @p settings and written back.
*/
virtual bool init(QSettings &settings);
bool init(QSettings &settings) Q_DECL_OVERRIDE;
/**
* This method applies the configured settings to the QtSql @p database
* instance.
*/
virtual void apply(QSqlDatabase &database);
void apply(QSqlDatabase &database) Q_DECL_OVERRIDE;
/**
* Returns whether an internal server needs to be used.
*/
virtual bool useInternalServer() const;
bool useInternalServer() const Q_DECL_OVERRIDE;
/**