diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-26 17:34:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-27 08:27:38 +0000 |
commit | e17c89f4ce74e5699ed50dc2187a39d8990316c4 (patch) | |
tree | b1f9b85d5bd1233d8931813dc4e06f7342be2249 /examples/quick/scenegraph/simplematerial | |
parent | e41d067227eb6225b05df88ab724708588fa5304 (diff) |
use the override keyword consistently and correctly (clang-tidy)
Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples/quick/scenegraph/simplematerial')
-rw-r--r-- | examples/quick/scenegraph/simplematerial/simplematerial.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/quick/scenegraph/simplematerial/simplematerial.cpp b/examples/quick/scenegraph/simplematerial/simplematerial.cpp index 96c08aff04..6773b6fb5a 100644 --- a/examples/quick/scenegraph/simplematerial/simplematerial.cpp +++ b/examples/quick/scenegraph/simplematerial/simplematerial.cpp @@ -87,7 +87,7 @@ class Shader : public QSGSimpleMaterialShader<State> //! [2] //! [3] public: - const char *vertexShader() const { + const char *vertexShader() const override { return "attribute highp vec4 aVertex; \n" "attribute highp vec2 aTexCoord; \n" @@ -99,7 +99,7 @@ public: "}"; } - const char *fragmentShader() const { + const char *fragmentShader() const override { return "uniform lowp float qt_Opacity; \n" "uniform lowp vec4 color; \n" @@ -110,17 +110,17 @@ public: "}"; } //! [3] //! [4] - QList<QByteArray> attributes() const + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } //! [4] //! [5] - void updateState(const State *state, const State *) + void updateState(const State *state, const State *) override { program()->setUniformValue(id_color, state->color); } //! [5] //! [6] - void resolveUniforms() + void resolveUniforms() override { id_color = program()->uniformLocation("color"); } @@ -184,7 +184,7 @@ private: //! [8] //! [9] public: - QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) + QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) override { ColorNode *n = static_cast<ColorNode *>(node); if (!node) |