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/twotextureproviders/xorblender.cpp | |
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/twotextureproviders/xorblender.cpp')
-rw-r--r-- | examples/quick/scenegraph/twotextureproviders/xorblender.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp index 3c02c4695e..8d7597addf 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp @@ -77,7 +77,7 @@ class XorBlendShader : public QSGSimpleMaterialShader<XorBlendState> QSG_DECLARE_SIMPLE_SHADER(XorBlendShader, XorBlendState) public: - const char *vertexShader() const { + const char *vertexShader() const override { return "attribute highp vec4 aVertex; \n" "attribute highp vec2 aTexCoord; \n" @@ -89,7 +89,7 @@ public: "}"; } - const char *fragmentShader() const { + const char *fragmentShader() const override { return "uniform lowp float qt_Opacity; \n" "uniform lowp sampler2D uSource1; \n" @@ -102,11 +102,11 @@ public: "}"; } - QList<QByteArray> attributes() const { + QList<QByteArray> attributes() const override { return QList<QByteArray>() << "aVertex" << "aTexCoord"; } - void updateState(const XorBlendState *state, const XorBlendState *) { + void updateState(const XorBlendState *state, const XorBlendState *) override { QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); // We bind the textures in inverse order so that we leave the updateState // function with GL_TEXTURE0 as the active texture unit. This is maintain @@ -118,7 +118,7 @@ public: state->texture1->bind(); } - void resolveUniforms() { + void resolveUniforms() override { // The texture units never change, only the texturess we bind to them so // we set these once and for all here. program()->setUniformValue("uSource1", 0); // GL_TEXTURE0 @@ -165,7 +165,7 @@ public: connect(m_provider2.data(), &QSGTextureProvider::textureChanged, this, &XorNode::textureChange, Qt::DirectConnection); } - void preprocess() { + void preprocess() override { XorBlendState *state = m_material->state(); // Update the textures from the providers, calling into QSGDynamicTexture if required if (m_provider1) { |