From 7e302a5236e62d6b2cd671c48fed659ef2fd2173 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Fri, 13 Feb 2015 13:31:30 +0100 Subject: [PATCH] Use Q_DECL_OVERRIDE where possible REVIEW: 122542 --- autotests/coronatest.h | 6 +++--- src/declarativeimports/calendar/daysmodel.h | 4 ++-- src/declarativeimports/core/corebindingsplugin.h | 4 ++-- src/declarativeimports/core/datamodel.h | 12 ++++++------ src/declarativeimports/core/framesvgitem.h | 6 +++--- src/declarativeimports/core/iconitem.h | 4 ++-- src/declarativeimports/core/svgitem.h | 2 +- src/declarativeimports/core/tooltip.h | 6 +++--- src/declarativeimports/core/tooltipdialog.h | 10 +++++----- src/declarativeimports/core/units.h | 2 +- src/declarativeimports/core/windowthumbnail.h | 4 ++-- .../plasmacomponents/plasmacomponentsplugin.h | 4 ++-- src/declarativeimports/plasmacomponents/qmenu.h | 2 +- .../appbackgroundprovider_p.h | 2 +- .../plasmaextracomponentsplugin.h | 4 ++-- src/plasma/applet.h | 2 +- src/plasma/containment.h | 6 +++--- src/plasma/datacontainer.h | 2 +- src/plasma/dataengine.h | 2 +- src/plasma/framesvg.h | 2 +- src/plasma/private/datacontainer_p.h | 2 +- src/plasma/private/dataenginemanager_p.h | 2 +- src/plasma/private/packages_p.h | 14 +++++++------- src/plasma/private/packagestructure_p.h | 8 ++++---- src/plasma/private/service_p.h | 4 ++-- src/plasma/private/storage_p.h | 4 ++-- src/plasma/private/storagethread_p.h | 2 +- src/plasma/private/theme_p.h | 2 +- src/plasma/scripting/appletscript.h | 4 ++-- src/plasma/scripting/dataenginescript.h | 4 ++-- src/plasma/servicejob.h | 2 +- src/plasma/svg.h | 2 +- src/plasmaquick/appletquickitem.h | 4 ++-- src/plasmaquick/configmodel.h | 4 ++-- src/plasmaquick/configview.h | 4 ++-- src/plasmaquick/dialog.h | 16 ++++++++-------- src/plasmaquick/packageurlinterceptor.h | 2 +- src/plasmaquick/private/packages.h | 6 +++--- src/plasmaquick/shellpluginloader.h | 2 +- src/scriptengines/qml/plasmoid/appletinterface.h | 6 +++--- .../qml/plasmoid/containmentinterface.h | 8 ++++---- .../qml/plasmoid/declarativeappletscript.h | 6 +++--- tests/testengine/testengine.h | 2 +- 43 files changed, 98 insertions(+), 98 deletions(-) diff --git a/autotests/coronatest.h b/autotests/coronatest.h index d20217ff1..8d5b3861c 100644 --- a/autotests/coronatest.h +++ b/autotests/coronatest.h @@ -30,7 +30,7 @@ class SimpleLoader : public Plasma::PluginLoader { protected: virtual Plasma::Applet *internalLoadApplet(const QString &name, uint appletId = 0, - const QVariantList &args = QVariantList()); + const QVariantList &args = QVariantList()) Q_DECL_OVERRIDE; }; @@ -42,8 +42,8 @@ public: explicit SimpleCorona(QObject * parent = 0); ~SimpleCorona(); - QRect screenGeometry(int) const; - int screenForContainment(const Plasma::Containment *) const; + QRect screenGeometry(int) const Q_DECL_OVERRIDE; + int screenForContainment(const Plasma::Containment *) const Q_DECL_OVERRIDE; }; class SimpleApplet : public Plasma::Applet diff --git a/src/declarativeimports/calendar/daysmodel.h b/src/declarativeimports/calendar/daysmodel.h index ec888374a..e1285f614 100644 --- a/src/declarativeimports/calendar/daysmodel.h +++ b/src/declarativeimports/calendar/daysmodel.h @@ -42,8 +42,8 @@ public: explicit DaysModel(QObject *parent = 0); void setSourceData(QList *data); - virtual int rowCount(const QModelIndex &parent) const; - virtual QVariant data(const QModelIndex &index, int role) const; + int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; void update(); private: diff --git a/src/declarativeimports/core/corebindingsplugin.h b/src/declarativeimports/core/corebindingsplugin.h index 7d6156e18..c6f5887f8 100644 --- a/src/declarativeimports/core/corebindingsplugin.h +++ b/src/declarativeimports/core/corebindingsplugin.h @@ -34,8 +34,8 @@ class CoreBindingsPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - void initializeEngine(QQmlEngine *engine, const char *uri); - void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE; + void registerTypes(const char *uri) Q_DECL_OVERRIDE; }; #endif diff --git a/src/declarativeimports/core/datamodel.h b/src/declarativeimports/core/datamodel.h index 919f96270..f0a6ee28d 100644 --- a/src/declarativeimports/core/datamodel.h +++ b/src/declarativeimports/core/datamodel.h @@ -176,14 +176,14 @@ public: int roleNameToId(const QString &name); //Reimplemented - QVariant data(const QModelIndex &index, int role) const; + QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const; + int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QModelIndex index(int row, int column, - const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &child) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; + const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; int count() const { diff --git a/src/declarativeimports/core/framesvgitem.h b/src/declarativeimports/core/framesvgitem.h index 8abe1b874..20486c712 100644 --- a/src/declarativeimports/core/framesvgitem.h +++ b/src/declarativeimports/core/framesvgitem.h @@ -176,19 +176,19 @@ public: bool fromCurrentTheme() const; void geometryChanged(const QRectF &newGeometry, - const QRectF &oldGeometry); + const QRectF &oldGeometry) Q_DECL_OVERRIDE; /** * Only to be used from inside this library, is not intended to be invokable */ Plasma::FrameSvg *frameSvg() const; - virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE; protected: - virtual void componentComplete(); + void componentComplete() Q_DECL_OVERRIDE; /// @endcond diff --git a/src/declarativeimports/core/iconitem.h b/src/declarativeimports/core/iconitem.h index d3b9305ac..3ef0306fe 100644 --- a/src/declarativeimports/core/iconitem.h +++ b/src/declarativeimports/core/iconitem.h @@ -64,10 +64,10 @@ public: bool isValid() const; - QSGNode* updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData); + QSGNode* updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData) Q_DECL_OVERRIDE; void geometryChanged(const QRectF &newGeometry, - const QRectF &oldGeometry); + const QRectF &oldGeometry) Q_DECL_OVERRIDE; void componentComplete() Q_DECL_OVERRIDE; diff --git a/src/declarativeimports/core/svgitem.h b/src/declarativeimports/core/svgitem.h index 6cef4805f..7f9e44c78 100644 --- a/src/declarativeimports/core/svgitem.h +++ b/src/declarativeimports/core/svgitem.h @@ -81,7 +81,7 @@ public: QSizeF naturalSize() const; - QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData); + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) Q_DECL_OVERRIDE; /// @endcond Q_SIGNALS: diff --git a/src/declarativeimports/core/tooltip.h b/src/declarativeimports/core/tooltip.h index 013f6cd1e..7a58826fd 100644 --- a/src/declarativeimports/core/tooltip.h +++ b/src/declarativeimports/core/tooltip.h @@ -169,9 +169,9 @@ public Q_SLOTS: protected: /// @cond INTERNAL_DOCS - bool childMouseEventFilter(QQuickItem *item, QEvent *event); - void hoverEnterEvent(QHoverEvent *event); - void hoverLeaveEvent(QHoverEvent *event); + bool childMouseEventFilter(QQuickItem *item, QEvent *event) Q_DECL_OVERRIDE; + void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE; + void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE; ToolTipDialog *tooltipDialogInstance(); /// @endcond diff --git a/src/declarativeimports/core/tooltipdialog.h b/src/declarativeimports/core/tooltipdialog.h index 7ae2c0b57..d81dadb69 100644 --- a/src/declarativeimports/core/tooltipdialog.h +++ b/src/declarativeimports/core/tooltipdialog.h @@ -55,7 +55,7 @@ public: /** * animate the position change if visible */ - virtual void adjustGeometry(const QRect &geom); + void adjustGeometry(const QRect &geom) Q_DECL_OVERRIDE; void dismiss(); void keepalive(); @@ -67,10 +67,10 @@ public: void setAnimationsEnabled(bool enabled); protected: - void showEvent(QShowEvent *event); - void hideEvent(QHideEvent *event); - void resizeEvent(QResizeEvent *re); - bool event(QEvent *e); + void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *re) Q_DECL_OVERRIDE; + bool event(QEvent *e) Q_DECL_OVERRIDE; private Q_SLOTS: void valueChanged(const QVariant &value); diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h index bb52a0e21..6c038ba96 100644 --- a/src/declarativeimports/core/units.h +++ b/src/declarativeimports/core/units.h @@ -105,7 +105,7 @@ public: Units(QObject *parent = 0); ~Units(); - bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; /** * @return pixel value for a grid Unit. Depends on DPI and font size. diff --git a/src/declarativeimports/core/windowthumbnail.h b/src/declarativeimports/core/windowthumbnail.h index d6f016eff..576b05322 100644 --- a/src/declarativeimports/core/windowthumbnail.h +++ b/src/declarativeimports/core/windowthumbnail.h @@ -83,8 +83,8 @@ class WindowThumbnail : public QQuickItem, public QAbstractNativeEventFilter public: WindowThumbnail(QQuickItem *parent = 0); virtual ~WindowThumbnail(); - virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long int *result); - virtual QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData); + bool nativeEventFilter(const QByteArray &eventType, void *message, long int *result) Q_DECL_OVERRIDE; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) Q_DECL_OVERRIDE; uint32_t winId() const; void setWinId(uint32_t winId); diff --git a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.h b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.h index 035a40f80..72ad046d0 100644 --- a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.h +++ b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.h @@ -51,8 +51,8 @@ class PlasmaComponentsPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - void initializeEngine(QQmlEngine *engine, const char *uri); - void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE; + void registerTypes(const char *uri) Q_DECL_OVERRIDE; }; #endif diff --git a/src/declarativeimports/plasmacomponents/qmenu.h b/src/declarativeimports/plasmacomponents/qmenu.h index 14403bfdf..a927d1267 100644 --- a/src/declarativeimports/plasmacomponents/qmenu.h +++ b/src/declarativeimports/plasmacomponents/qmenu.h @@ -69,7 +69,7 @@ public: Q_INVOKABLE void addMenuItem(QMenuItem *item); protected: - bool event(QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; Q_SIGNALS: void statusChanged(); diff --git a/src/declarativeimports/plasmaextracomponents/appbackgroundprovider_p.h b/src/declarativeimports/plasmaextracomponents/appbackgroundprovider_p.h index 02e14af6c..34b7dd6d1 100644 --- a/src/declarativeimports/plasmaextracomponents/appbackgroundprovider_p.h +++ b/src/declarativeimports/plasmaextracomponents/appbackgroundprovider_p.h @@ -33,7 +33,7 @@ class AppBackgroundProvider : public QQuickImageProvider public: AppBackgroundProvider(); ~AppBackgroundProvider(); - virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize); + QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE; private: Plasma::Theme *m_theme; }; diff --git a/src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.h b/src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.h index 3fa78cc91..c4cdd50d3 100644 --- a/src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.h +++ b/src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.h @@ -31,8 +31,8 @@ class PlasmaExtraComponentsPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - void initializeEngine(QQmlEngine *engine, const char *uri); - void registerTypes(const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE; + void registerTypes(const char *uri) Q_DECL_OVERRIDE; }; #endif diff --git a/src/plasma/applet.h b/src/plasma/applet.h index ea96bc8a5..9d5634b76 100644 --- a/src/plasma/applet.h +++ b/src/plasma/applet.h @@ -592,7 +592,7 @@ protected: /** * Reimplemented from QObject */ - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; private: /** diff --git a/src/plasma/containment.h b/src/plasma/containment.h index e3d44bbec..610689365 100644 --- a/src/plasma/containment.h +++ b/src/plasma/containment.h @@ -90,7 +90,7 @@ public: /** * Reimplemented from Applet */ - void init(); + void init() Q_DECL_OVERRIDE; /** * Returns the type of containment @@ -145,13 +145,13 @@ public: * @reimp * @sa Applet::save(KConfigGroup &) */ - void save(KConfigGroup &group) const; + void save(KConfigGroup &group) const Q_DECL_OVERRIDE; /** * @reimp * @sa Applet::restore(KConfigGroup &) */ - void restore(KConfigGroup &group); + void restore(KConfigGroup &group) Q_DECL_OVERRIDE; /** * Sets wallpaper plugin. diff --git a/src/plasma/datacontainer.h b/src/plasma/datacontainer.h index c58c8e19a..fa5807edb 100644 --- a/src/plasma/datacontainer.h +++ b/src/plasma/datacontainer.h @@ -275,7 +275,7 @@ protected Q_SLOTS: /** * @reimp from QObject */ - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; private: friend class SignalRelay; diff --git a/src/plasma/dataengine.h b/src/plasma/dataengine.h index d87a6f836..b91adc268 100644 --- a/src/plasma/dataengine.h +++ b/src/plasma/dataengine.h @@ -390,7 +390,7 @@ protected: /** * Reimplemented from QObject **/ - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; /** * Sets the icon for this data engine diff --git a/src/plasma/framesvg.h b/src/plasma/framesvg.h index 9aaf5440c..dbb6b50c9 100644 --- a/src/plasma/framesvg.h +++ b/src/plasma/framesvg.h @@ -110,7 +110,7 @@ public: * Loads a new Svg * @param imagePath the new file */ - Q_INVOKABLE void setImagePath(const QString &path); + Q_INVOKABLE void setImagePath(const QString &path) Q_DECL_OVERRIDE; /** * Sets what borders should be painted diff --git a/src/plasma/private/datacontainer_p.h b/src/plasma/private/datacontainer_p.h index 48b773a80..6742fb73f 100644 --- a/src/plasma/private/datacontainer_p.h +++ b/src/plasma/private/datacontainer_p.h @@ -124,7 +124,7 @@ Q_SIGNALS: void dataUpdated(const QString &, const Plasma::DataEngine::Data &); protected: - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; }; } // Plasma namespace diff --git a/src/plasma/private/dataenginemanager_p.h b/src/plasma/private/dataenginemanager_p.h index c55a055f0..4e284ec50 100644 --- a/src/plasma/private/dataenginemanager_p.h +++ b/src/plasma/private/dataenginemanager_p.h @@ -78,7 +78,7 @@ protected: /** * Reimplemented from QObject **/ - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; private: /** diff --git a/src/plasma/private/packages_p.h b/src/plasma/private/packages_p.h index 0e0e80329..a7c4cb143 100644 --- a/src/plasma/private/packages_p.h +++ b/src/plasma/private/packages_p.h @@ -32,8 +32,8 @@ class ChangeableMainScriptPackage : public KPackage::PackageStructure { Q_OBJECT public: - void initPackage(KPackage::Package *package); - void pathChanged(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; + void pathChanged(KPackage::Package *package) Q_DECL_OVERRIDE; protected: virtual QString mainScriptConfigKey() const; @@ -43,35 +43,35 @@ class GenericPackage : public ChangeableMainScriptPackage { Q_OBJECT public: - void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; }; class PlasmoidPackage : public GenericPackage { Q_OBJECT public: - void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; }; class DataEnginePackage : public ChangeableMainScriptPackage { Q_OBJECT public: - void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; }; class ThemePackage : public KPackage::PackageStructure { Q_OBJECT public: - void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; }; class ContainmentActionsPackage : public ChangeableMainScriptPackage { Q_OBJECT public: - void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; }; } // namespace Plasma diff --git a/src/plasma/private/packagestructure_p.h b/src/plasma/private/packagestructure_p.h index 24124e9fb..489e700e7 100644 --- a/src/plasma/private/packagestructure_p.h +++ b/src/plasma/private/packagestructure_p.h @@ -37,12 +37,12 @@ public: ~PackageStructureWrapper(); - virtual void initPackage(KPackage::Package *package); + void initPackage(KPackage::Package *package) Q_DECL_OVERRIDE; - virtual void pathChanged(KPackage::Package *package); + void pathChanged(KPackage::Package *package) Q_DECL_OVERRIDE; - virtual KJob *install(KPackage::Package *package, const QString &archivePath, const QString &packageRoot); - virtual KJob *uninstall(KPackage::Package *package, const QString &packageRoot); + KJob *install(KPackage::Package *package, const QString &archivePath, const QString &packageRoot) Q_DECL_OVERRIDE; + KJob *uninstall(KPackage::Package *package, const QString &packageRoot) Q_DECL_OVERRIDE; private: QPointer m_struct; diff --git a/src/plasma/private/service_p.h b/src/plasma/private/service_p.h index d0886dbc2..8a48487e3 100644 --- a/src/plasma/private/service_p.h +++ b/src/plasma/private/service_p.h @@ -42,7 +42,7 @@ public: { } - void start() + void start() Q_DECL_OVERRIDE { setErrorText(i18nc("Error message, tried to start an invalid service", "Invalid (null) service, can not perform any operations.")); emitResult(); @@ -59,7 +59,7 @@ public: setName("NullService"); } - ServiceJob *createJob(const QString &operation, QVariantMap &) + ServiceJob *createJob(const QString &operation, QVariantMap &) Q_DECL_OVERRIDE { return new NullServiceJob(destination(), operation, this); } diff --git a/src/plasma/private/storage_p.h b/src/plasma/private/storage_p.h index 9cef17c6b..4d2209b46 100644 --- a/src/plasma/private/storage_p.h +++ b/src/plasma/private/storage_p.h @@ -42,7 +42,7 @@ public: ~StorageJob(); void setData(const QVariantMap &data); QVariantMap data() const; - void start(); + void start() Q_DECL_OVERRIDE; QString clientName() const; protected Q_SLOTS: @@ -66,7 +66,7 @@ public: ~Storage(); protected: - Plasma::ServiceJob *createJob(const QString &operation, QVariantMap ¶meters); + Plasma::ServiceJob *createJob(const QString &operation, QVariantMap ¶meters) Q_DECL_OVERRIDE; private: QString m_clientName; diff --git a/src/plasma/private/storagethread_p.h b/src/plasma/private/storagethread_p.h index 2746810a2..d55950cb7 100644 --- a/src/plasma/private/storagethread_p.h +++ b/src/plasma/private/storagethread_p.h @@ -36,7 +36,7 @@ public: StorageThread(QObject *parent = 0); ~StorageThread(); - void run(); + void run() Q_DECL_OVERRIDE; static Plasma::StorageThread *self(); diff --git a/src/plasma/private/theme_p.h b/src/plasma/private/theme_p.h index 96e98ed26..68336f098 100644 --- a/src/plasma/private/theme_p.h +++ b/src/plasma/private/theme_p.h @@ -117,7 +117,7 @@ public: KColorScheme colorScheme; KColorScheme buttonColorScheme; KColorScheme viewColorScheme; - bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; KConfigGroup cfg; QString defaultWallpaperTheme; QString defaultWallpaperSuffix; diff --git a/src/plasma/scripting/appletscript.h b/src/plasma/scripting/appletscript.h index fd514a0eb..863d70702 100644 --- a/src/plasma/scripting/appletscript.h +++ b/src/plasma/scripting/appletscript.h @@ -147,14 +147,14 @@ protected: /** * @return absolute path to the main script file for this plasmoid */ - QString mainScript() const; + QString mainScript() const Q_DECL_OVERRIDE; /** * @return the Package associated with this plasmoid which can * be used to request resources, such as images and * interface files. */ - Package package() const; + Package package() const Q_DECL_OVERRIDE; /** * @return the KPluginInfo associated with this plasmoid diff --git a/src/plasma/scripting/dataenginescript.h b/src/plasma/scripting/dataenginescript.h index 5d4492be4..f7ad3c2f7 100644 --- a/src/plasma/scripting/dataenginescript.h +++ b/src/plasma/scripting/dataenginescript.h @@ -101,14 +101,14 @@ protected: /** * @return absolute path to the main script file for this plasmoid */ - QString mainScript() const; + QString mainScript() const Q_DECL_OVERRIDE; /** * @return the Package associated with this plasmoid which can * be used to request resources, such as images and * interface files. */ - Package package() const; + Package package() const Q_DECL_OVERRIDE; /** * @return the KPluginInfo associated with this plasmoid diff --git a/src/plasma/servicejob.h b/src/plasma/servicejob.h index 56b7577c7..ec51695b9 100644 --- a/src/plasma/servicejob.h +++ b/src/plasma/servicejob.h @@ -105,7 +105,7 @@ public: * Default implementation of start, which simply sets the results to false. * This makes it easy to create a "failure" job. */ - Q_INVOKABLE virtual void start(); + Q_INVOKABLE void start() Q_DECL_OVERRIDE; protected: /** diff --git a/src/plasma/svg.h b/src/plasma/svg.h index 4982bdaf7..0bcbd7a3d 100644 --- a/src/plasma/svg.h +++ b/src/plasma/svg.h @@ -440,7 +440,7 @@ Q_SIGNALS: private: SvgPrivate *const d; - bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; Q_PRIVATE_SLOT(d, void themeChanged()) Q_PRIVATE_SLOT(d, void colorsChanged()) diff --git a/src/plasmaquick/appletquickitem.h b/src/plasmaquick/appletquickitem.h index 31441e6c4..dffbcf30f 100644 --- a/src/plasmaquick/appletquickitem.h +++ b/src/plasmaquick/appletquickitem.h @@ -146,8 +146,8 @@ protected: KDeclarative::QmlObject *qmlObject(); //Reimplementation - void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); - virtual void itemChange(ItemChange change, const ItemChangeData &value); + void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE; + void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE; private: AppletQuickItemPrivate *const d; diff --git a/src/plasmaquick/configmodel.h b/src/plasmaquick/configmodel.h index c24dee1f9..489c13551 100644 --- a/src/plasmaquick/configmodel.h +++ b/src/plasmaquick/configmodel.h @@ -92,8 +92,8 @@ public: { return rowCount(); } - virtual int rowCount(const QModelIndex &index = QModelIndex()) const; - virtual QVariant data(const QModelIndex &, int) const; + int rowCount(const QModelIndex &index = QModelIndex()) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &, int) const Q_DECL_OVERRIDE; /** * @param row the row for which the data will be returned diff --git a/src/plasmaquick/configview.h b/src/plasmaquick/configview.h index 42e241f6e..5ac9c26d8 100644 --- a/src/plasmaquick/configview.h +++ b/src/plasmaquick/configview.h @@ -77,8 +77,8 @@ Q_SIGNALS: void appletGlobalShortcutChanged(); protected: - void hideEvent(QHideEvent *ev); - void resizeEvent(QResizeEvent *re); + void hideEvent(QHideEvent *ev) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *re) Q_DECL_OVERRIDE; private: ConfigViewPrivate *const d; diff --git a/src/plasmaquick/dialog.h b/src/plasmaquick/dialog.h index 893db05de..63efa04cd 100644 --- a/src/plasmaquick/dialog.h +++ b/src/plasmaquick/dialog.h @@ -229,14 +229,14 @@ protected: virtual void adjustGeometry(const QRect &geom); //Reimplementations - virtual void classBegin(); - virtual void componentComplete(); - virtual void resizeEvent(QResizeEvent *re); - virtual void focusInEvent(QFocusEvent *ev); - virtual void focusOutEvent(QFocusEvent *ev); - virtual void showEvent(QShowEvent *event); - virtual void hideEvent(QHideEvent *event); - virtual bool event(QEvent *event); + void classBegin() Q_DECL_OVERRIDE; + void componentComplete() Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *re) Q_DECL_OVERRIDE; + void focusInEvent(QFocusEvent *ev) Q_DECL_OVERRIDE; + void focusOutEvent(QFocusEvent *ev) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE; + bool event(QEvent *event) Q_DECL_OVERRIDE; private: friend class DialogPrivate; diff --git a/src/plasmaquick/packageurlinterceptor.h b/src/plasmaquick/packageurlinterceptor.h index 03535a414..36c85a9ed 100644 --- a/src/plasmaquick/packageurlinterceptor.h +++ b/src/plasmaquick/packageurlinterceptor.h @@ -53,7 +53,7 @@ public: void removeAllowedPath(const QString &path); QStringList allowedPaths() const; - virtual QUrl intercept(const QUrl &path, QQmlAbstractUrlInterceptor::DataType type); + QUrl intercept(const QUrl &path, QQmlAbstractUrlInterceptor::DataType type) Q_DECL_OVERRIDE; static inline QByteArray prefixForType(QQmlAbstractUrlInterceptor::DataType type, const QString &fileName) { diff --git a/src/plasmaquick/private/packages.h b/src/plasmaquick/private/packages.h index 7498832d0..aa08b116f 100644 --- a/src/plasmaquick/private/packages.h +++ b/src/plasmaquick/private/packages.h @@ -28,19 +28,19 @@ class LookAndFeelPackage : public Plasma::PackageStructure { public: - void initPackage(Plasma::Package *package); + void initPackage(Plasma::Package *package) Q_DECL_OVERRIDE; }; class QmlWallpaperPackage : public Plasma::PackageStructure { public: - void initPackage(Plasma::Package *package); + void initPackage(Plasma::Package *package) Q_DECL_OVERRIDE; }; class LayoutTemplatePackage : public Plasma::PackageStructure { public: - void initPackage(Plasma::Package *package); + void initPackage(Plasma::Package *package) Q_DECL_OVERRIDE; }; #endif // LOOKANDFEELPACKAGE_H diff --git a/src/plasmaquick/shellpluginloader.h b/src/plasmaquick/shellpluginloader.h index 6c56e5f7b..bdc13beb1 100644 --- a/src/plasmaquick/shellpluginloader.h +++ b/src/plasmaquick/shellpluginloader.h @@ -33,7 +33,7 @@ public: static void init(); protected: - Plasma::Package internalLoadPackage(const QString &packageFormat, const QString &specialization); + Plasma::Package internalLoadPackage(const QString &packageFormat, const QString &specialization) Q_DECL_OVERRIDE; /** These members are actually file-static in the .cpp because binary compat must be preserved diff --git a/src/scriptengines/qml/plasmoid/appletinterface.h b/src/scriptengines/qml/plasmoid/appletinterface.h index 457f5df64..e4bbdca6a 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.h +++ b/src/scriptengines/qml/plasmoid/appletinterface.h @@ -362,11 +362,11 @@ Q_SIGNALS: void globalShortcutChanged(); protected Q_SLOTS: - virtual void init(); + void init() Q_DECL_OVERRIDE; protected: - bool event(QEvent *event); - bool eventFilter(QObject *watched, QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; private Q_SLOTS: void destroyedChanged(bool destroyed); diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.h b/src/scriptengines/qml/plasmoid/containmentinterface.h index aa3d1a745..7c899e042 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.h +++ b/src/scriptengines/qml/plasmoid/containmentinterface.h @@ -150,10 +150,10 @@ public: } protected: - void init(); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void wheelEvent(QWheelEvent *event); + void init() Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; void addAppletActions(QMenu &desktopMenu, Plasma::Applet *applet, QEvent *event); void addContainmentActions(QMenu &desktopMenu, QEvent *event); diff --git a/src/scriptengines/qml/plasmoid/declarativeappletscript.h b/src/scriptengines/qml/plasmoid/declarativeappletscript.h index e4d6d999c..cee44faa5 100644 --- a/src/scriptengines/qml/plasmoid/declarativeappletscript.h +++ b/src/scriptengines/qml/plasmoid/declarativeappletscript.h @@ -38,15 +38,15 @@ public: QString filePath(const QString &type, const QString &file) const; - QList contextualActions(); + QList contextualActions() Q_DECL_OVERRIDE; - void constraintsEvent(Plasma::Types::Constraints constraints); + void constraintsEvent(Plasma::Types::Constraints constraints) Q_DECL_OVERRIDE; public Q_SLOTS: void executeAction(const QString &name); protected: - bool init(); + bool init() Q_DECL_OVERRIDE; Q_SIGNALS: void formFactorChanged(); diff --git a/tests/testengine/testengine.h b/tests/testengine/testengine.h index b3b239044..ade92bcdb 100644 --- a/tests/testengine/testengine.h +++ b/tests/testengine/testengine.h @@ -41,7 +41,7 @@ public: protected: void init(); - bool sourceRequestEvent(const QString &source); + bool sourceRequestEvent(const QString &source) Q_DECL_OVERRIDE; }; #endif // __TESTDATAENGINE_H__