From 7b6f30c13717654ec3b95e67edde88a03da45e22 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 14 Aug 2020 15:07:29 +0200 Subject: Fix suggest-override warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also violates modern Qt code style Change-Id: Ibb12b6db18bbd2669377abe1d25034ed69a86389 Reviewed-by: Jüri Valdmann --- src/webengine/api/qquickwebenginefaviconprovider_p_p.h | 2 +- src/webengine/api/qquickwebenginehistory_p.h | 6 +++--- src/webengine/api/qquickwebenginetestsupport_p.h | 6 +++--- src/webengine/api/qquickwebenginetouchhandleprovider_p_p.h | 2 +- src/webengine/testsupport/plugin.cpp | 2 +- src/webenginewidgets/api/qwebenginepage.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/webengine/api/qquickwebenginefaviconprovider_p_p.h b/src/webengine/api/qquickwebenginefaviconprovider_p_p.h index 18b6d61c8..4ccc4ba10 100644 --- a/src/webengine/api/qquickwebenginefaviconprovider_p_p.h +++ b/src/webengine/api/qquickwebenginefaviconprovider_p_p.h @@ -72,7 +72,7 @@ public: void detach(QQuickWebEngineView *); - virtual QPixmap requestPixmap(const QString &, QSize *, const QSize &); + QPixmap requestPixmap(const QString &, QSize *, const QSize &) override; private: QQuickWebEngineView *viewForIconUrl(const QUrl &) const; diff --git a/src/webengine/api/qquickwebenginehistory_p.h b/src/webengine/api/qquickwebenginehistory_p.h index 5d4783e96..db0be3bad 100644 --- a/src/webengine/api/qquickwebenginehistory_p.h +++ b/src/webengine/api/qquickwebenginehistory_p.h @@ -73,9 +73,9 @@ public: QQuickWebEngineHistoryListModel(QQuickWebEngineHistoryListModelPrivate*); virtual ~QQuickWebEngineHistoryListModel(); - int rowCount(const QModelIndex& parent = QModelIndex()) const; - QVariant data(const QModelIndex& index, int role) const; - QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role) const override; + QHash roleNames() const override; void reset(); private: diff --git a/src/webengine/api/qquickwebenginetestsupport_p.h b/src/webengine/api/qquickwebenginetestsupport_p.h index 30e6ee5c4..89a997b29 100644 --- a/src/webengine/api/qquickwebenginetestsupport_p.h +++ b/src/webengine/api/qquickwebenginetestsupport_p.h @@ -86,9 +86,9 @@ public: Q_INVOKABLE void create(); Q_INVOKABLE void release(); - virtual void showInputPanel(); - virtual void hideInputPanel(); - virtual bool isInputPanelVisible() const; + void showInputPanel() override; + void hideInputPanel() override; + bool isInputPanelVisible() const override; private: bool m_visible; diff --git a/src/webengine/api/qquickwebenginetouchhandleprovider_p_p.h b/src/webengine/api/qquickwebenginetouchhandleprovider_p_p.h index 277436289..5379a5729 100644 --- a/src/webengine/api/qquickwebenginetouchhandleprovider_p_p.h +++ b/src/webengine/api/qquickwebenginetouchhandleprovider_p_p.h @@ -65,7 +65,7 @@ public: ~QQuickWebEngineTouchHandleProvider(); void init(const QMap &images); - virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize); + QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override; private: QMap m_touchHandleMap; diff --git a/src/webengine/testsupport/plugin.cpp b/src/webengine/testsupport/plugin.cpp index 7a1e73d8b..828110207 100644 --- a/src/webengine/testsupport/plugin.cpp +++ b/src/webengine/testsupport/plugin.cpp @@ -48,7 +48,7 @@ class QtWebEngineTestSupportPlugin : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - virtual void registerTypes(const char *uri) + void registerTypes(const char *uri) override { qWarning("\nWARNING: This project is using the testsupport QML API extensions for QtWebEngine and is therefore tied to a specific QtWebEngine release.\n" "WARNING: The testsupport API will change from version to version, or even be removed. You have been warned!\n"); diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index 3cf6a9f8b..3bf79526d 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -255,7 +255,7 @@ public: void replaceMisspelledWord(const QString &replacement); - virtual bool event(QEvent*); + bool event(QEvent*) override; void findText(const QString &subString, FindFlags options = FindFlags(), const QWebEngineCallback &resultCallback = QWebEngineCallback()); -- cgit v1.2.3