From e17c89f4ce74e5699ed50dc2187a39d8990316c4 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 26 Feb 2018 17:34:27 +0100 Subject: use the override keyword consistently and correctly (clang-tidy) Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing --- src/quick/scenegraph/coreapi/qsgabstractrenderer.h | 2 +- src/quick/scenegraph/coreapi/qsgnode.h | 12 ++++++------ src/quick/scenegraph/coreapi/qsgrendernode.h | 2 +- src/quick/scenegraph/qsgcontext_p.h | 4 ++-- src/quick/scenegraph/util/qsgengine.h | 2 +- src/quick/scenegraph/util/qsgimagenode.h | 2 +- src/quick/scenegraph/util/qsgninepatchnode.h | 2 +- src/quick/scenegraph/util/qsgrectanglenode.h | 2 +- src/quick/scenegraph/util/qsgsimplematerial.h | 2 +- src/quick/scenegraph/util/qsgsimpletexturenode.h | 2 +- src/quick/scenegraph/util/qsgtexture.h | 2 +- src/quick/scenegraph/util/qsgtexture_p.h | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h index 304dc008d5..ab6fb4f317 100644 --- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h +++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h @@ -62,7 +62,7 @@ public: }; Q_DECLARE_FLAGS(ClearMode, ClearModeBit) - virtual ~QSGAbstractRenderer(); + ~QSGAbstractRenderer() override; void setRootNode(QSGRootNode *node); QSGRootNode *rootNode() const; diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index 528f100f8e..854e284c9e 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -190,7 +190,7 @@ void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString &descri class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode { public: - ~QSGBasicGeometryNode(); + ~QSGBasicGeometryNode() override; void setGeometry(QSGGeometry *geometry); const QSGGeometry *geometry() const { return m_geometry; } @@ -224,7 +224,7 @@ class Q_QUICK_EXPORT QSGGeometryNode : public QSGBasicGeometryNode { public: QSGGeometryNode(); - ~QSGGeometryNode(); + ~QSGGeometryNode() override; void setMaterial(QSGMaterial *material); QSGMaterial *material() const { return m_material; } @@ -257,7 +257,7 @@ class Q_QUICK_EXPORT QSGClipNode : public QSGBasicGeometryNode { public: QSGClipNode(); - ~QSGClipNode(); + ~QSGClipNode() override; void setIsRectangular(bool rectHint); bool isRectangular() const { return m_is_rectangular; } @@ -277,7 +277,7 @@ class Q_QUICK_EXPORT QSGTransformNode : public QSGNode { public: QSGTransformNode(); - ~QSGTransformNode(); + ~QSGTransformNode() override; void setMatrix(const QMatrix4x4 &matrix); const QMatrix4x4 &matrix() const { return m_matrix; } @@ -295,7 +295,7 @@ class Q_QUICK_EXPORT QSGRootNode : public QSGNode { public: QSGRootNode(); - ~QSGRootNode(); + ~QSGRootNode() override; private: void notifyNodeChange(QSGNode *node, DirtyState state); @@ -312,7 +312,7 @@ class Q_QUICK_EXPORT QSGOpacityNode : public QSGNode { public: QSGOpacityNode(); - ~QSGOpacityNode(); + ~QSGOpacityNode() override; void setOpacity(qreal opacity); qreal opacity() const { return m_opacity; } diff --git a/src/quick/scenegraph/coreapi/qsgrendernode.h b/src/quick/scenegraph/coreapi/qsgrendernode.h index f6bc40d3ee..0fb83b080c 100644 --- a/src/quick/scenegraph/coreapi/qsgrendernode.h +++ b/src/quick/scenegraph/coreapi/qsgrendernode.h @@ -80,7 +80,7 @@ public: }; QSGRenderNode(); - ~QSGRenderNode(); + ~QSGRenderNode() override; virtual StateFlags changedStates() const; virtual void render(const RenderState *state) = 0; diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index 00c23be60c..6d70d7ef6b 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -111,7 +111,7 @@ public: }; explicit QSGContext(QObject *parent = nullptr); - virtual ~QSGContext(); + ~QSGContext() override; virtual void renderContextInitialized(QSGRenderContext *renderContext); virtual void renderContextInvalidated(QSGRenderContext *renderContext); @@ -159,7 +159,7 @@ public: }; QSGRenderContext(QSGContext *context); - virtual ~QSGRenderContext(); + ~QSGRenderContext() override; QSGContext *sceneGraphContext() const { return m_sg; } virtual bool isValid() const { return true; } diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h index 514e6e8c2b..e9e01dc710 100644 --- a/src/quick/scenegraph/util/qsgengine.h +++ b/src/quick/scenegraph/util/qsgengine.h @@ -68,7 +68,7 @@ public: Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption) explicit QSGEngine(QObject *parent = nullptr); - ~QSGEngine(); + ~QSGEngine() override; void initialize(QOpenGLContext *context); void invalidate(); diff --git a/src/quick/scenegraph/util/qsgimagenode.h b/src/quick/scenegraph/util/qsgimagenode.h index 0e053c307f..526f52b7e5 100644 --- a/src/quick/scenegraph/util/qsgimagenode.h +++ b/src/quick/scenegraph/util/qsgimagenode.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGImageNode : public QSGGeometryNode { public: - virtual ~QSGImageNode() { } + ~QSGImageNode() override { } virtual void setRect(const QRectF &rect) = 0; inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgninepatchnode.h b/src/quick/scenegraph/util/qsgninepatchnode.h index 8509cbd326..e76afd3c4a 100644 --- a/src/quick/scenegraph/util/qsgninepatchnode.h +++ b/src/quick/scenegraph/util/qsgninepatchnode.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGNinePatchNode : public QSGGeometryNode { public: - virtual ~QSGNinePatchNode() { } + ~QSGNinePatchNode() override { } virtual void setTexture(QSGTexture *texture) = 0; virtual void setBounds(const QRectF &bounds) = 0; diff --git a/src/quick/scenegraph/util/qsgrectanglenode.h b/src/quick/scenegraph/util/qsgrectanglenode.h index 8e0da1d9c7..ba52b65b07 100644 --- a/src/quick/scenegraph/util/qsgrectanglenode.h +++ b/src/quick/scenegraph/util/qsgrectanglenode.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class Q_QUICK_EXPORT QSGRectangleNode : public QSGGeometryNode { public: - virtual ~QSGRectangleNode() { } + ~QSGRectangleNode() override { } virtual void setRect(const QRectF &rect) = 0; inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h index dcf9b89b21..79180ca8e2 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.h +++ b/src/quick/scenegraph/util/qsgsimplematerial.h @@ -185,7 +185,7 @@ public: QSGSimpleMaterialComparableMaterial(PtrShaderCreateFunc func) : QSGSimpleMaterial(func) {} - int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { return QSGSimpleMaterialComparableMaterial::state()->compare(static_cast *>(other)->state()); } }; diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.h b/src/quick/scenegraph/util/qsgsimpletexturenode.h index 09e4277c66..010463d3c6 100644 --- a/src/quick/scenegraph/util/qsgsimpletexturenode.h +++ b/src/quick/scenegraph/util/qsgsimpletexturenode.h @@ -52,7 +52,7 @@ class Q_QUICK_EXPORT QSGSimpleTextureNode : public QSGGeometryNode { public: QSGSimpleTextureNode(); - ~QSGSimpleTextureNode(); + ~QSGSimpleTextureNode() override; void setRect(const QRectF &rect); inline void setRect(qreal x, qreal y, qreal w, qreal h) { setRect(QRectF(x, y, w, h)); } diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h index 032129434e..7bd57a16e3 100644 --- a/src/quick/scenegraph/util/qsgtexture.h +++ b/src/quick/scenegraph/util/qsgtexture.h @@ -54,7 +54,7 @@ class Q_QUICK_EXPORT QSGTexture : public QObject public: QSGTexture(); - ~QSGTexture(); + ~QSGTexture() override; enum WrapMode { Repeat, diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h index 52dc6db2d0..18dd5eff68 100644 --- a/src/quick/scenegraph/util/qsgtexture_p.h +++ b/src/quick/scenegraph/util/qsgtexture_p.h @@ -83,7 +83,7 @@ class Q_QUICK_PRIVATE_EXPORT QSGPlainTexture : public QSGTexture Q_OBJECT public: QSGPlainTexture(); - virtual ~QSGPlainTexture(); + ~QSGPlainTexture() override; void setOwnsTexture(bool owns) { m_owns_texture = owns; } bool ownsTexture() const { return m_owns_texture; } -- cgit v1.2.3