Fix some warnings about virtual/override

This patch marks some functions "override" to silence the corresponding
warning.

Change-Id: I88ccc5fa7521ecccc84a6cba9f06ea185cc5679e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Andreas Buhr 2021-02-19 16:37:58 +01:00
parent 5540c9c107
commit a944de7742
3 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ public:
class QDebugProxyFactory : public QNetworkProxyFactory
{
public:
virtual QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery())
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()) override
{
returnedList = QNetworkProxyFactory::systemProxyForQuery(query);
requestCounter++;
@ -294,7 +294,7 @@ void tst_QNetworkProxyFactory::genericSystemProxy_data()
class QSPFQThread : public QThread
{
protected:
virtual void run()
void run() override
{
proxies = QNetworkProxyFactory::systemProxyForQuery(query);
}

View File

@ -157,7 +157,7 @@ public:
QList<int> hits;
protected:
void incomingConnection(quintptr socketDescriptor)
void incomingConnection(quintptr socketDescriptor) override
{
hits.append(socketDescriptor);
QLocalServer::incomingConnection(socketDescriptor);

View File

@ -47,7 +47,7 @@ public:
QByteArray cachedData;
virtual QNetworkCacheMetaData metaData(const QUrl &url)
QNetworkCacheMetaData metaData(const QUrl &url) override
{
QNetworkCacheMetaData metaData;
if (!cachedData.isEmpty()) {
@ -60,7 +60,7 @@ public:
return metaData;
}
virtual QIODevice *data(const QUrl &/*url*/)
QIODevice *data(const QUrl &/*url*/) override
{
if (cachedData.isEmpty())
return 0;