diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-12-05 00:03:04 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-12-07 20:10:22 +0000 |
commit | 3dd96630a2823ff9723a399c84303f565abce455 (patch) | |
tree | a1282f7dd2f192387131dce1d9790bd0549b75b7 /src/quick/scenegraph | |
parent | 485e9fdf486446fb13012debe10137739b96d8ca (diff) |
headers: Add missing override and remove redundant virtual
Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer_p.h | 10 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgbasicglyphnode_p.h | 14 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin_p.h | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | 8 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p_p.h | 16 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p.h | 18 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h | 34 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop_p.h | 30 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop_p.h | 26 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgsimplematerial.h | 6 |
10 files changed, 84 insertions, 84 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index 5880c67af0..bf267ccf92 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -141,7 +141,7 @@ public: virtual void update() = 0; - virtual void accept(QSGNodeVisitorEx *visitor) { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } + void accept(QSGNodeVisitorEx *visitor) override { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } }; @@ -165,7 +165,7 @@ public: virtual void update() = 0; - virtual void accept(QSGNodeVisitorEx *visitor) { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } + void accept(QSGNodeVisitorEx *visitor) override { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } }; class Q_QUICK_PRIVATE_EXPORT QSGPainterNode : public QSGVisitableNode @@ -188,7 +188,7 @@ public: virtual void update() = 0; virtual QSGTexture *texture() const = 0; - virtual void accept(QSGNodeVisitorEx *visitor) { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } + void accept(QSGNodeVisitorEx *visitor) override { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } }; class Q_QUICK_EXPORT QSGLayer : public QSGDynamicTexture @@ -231,7 +231,7 @@ public: virtual void update() = 0; - virtual void accept(QSGNodeVisitorEx *visitor) { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } + void accept(QSGNodeVisitorEx *visitor) override { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } }; #endif @@ -389,7 +389,7 @@ public: void setOwnerElement(QQuickItem *ownerElement) { m_ownerElement = ownerElement; } QQuickItem *ownerElement() const { return m_ownerElement; } - virtual void accept(QSGNodeVisitorEx *visitor) { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } + void accept(QSGNodeVisitorEx *visitor) override { if (visitor->visit(this)) visitor->visitChildren(this); visitor->endVisit(this); } protected: QRectF m_bounding_rect; QQuickItem *m_ownerElement; diff --git a/src/quick/scenegraph/qsgbasicglyphnode_p.h b/src/quick/scenegraph/qsgbasicglyphnode_p.h index 1d09367ea5..0a43d17d2b 100644 --- a/src/quick/scenegraph/qsgbasicglyphnode_p.h +++ b/src/quick/scenegraph/qsgbasicglyphnode_p.h @@ -63,16 +63,16 @@ public: QSGBasicGlyphNode(); virtual ~QSGBasicGlyphNode(); - virtual QPointF baseLine() const { return m_baseLine; } - virtual void setGlyphs(const QPointF &position, const QGlyphRun &glyphs); - virtual void setColor(const QColor &color); + QPointF baseLine() const override { return m_baseLine; } + void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override; + void setColor(const QColor &color) override; - virtual void setPreferredAntialiasingMode(AntialiasingMode) { } - virtual void setStyle(QQuickText::TextStyle); - virtual void setStyleColor(const QColor &); + void setPreferredAntialiasingMode(AntialiasingMode) override { } + void setStyle(QQuickText::TextStyle) override; + void setStyleColor(const QColor &) override; virtual void setMaterialColor(const QColor &color) = 0; - virtual void update() = 0; + void update() override = 0; protected: QGlyphRun m_glyphs; diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index 08c3d21408..5914b42809 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -90,10 +90,10 @@ public: explicit QSGContextPlugin(QObject *parent = 0); virtual ~QSGContextPlugin(); - virtual QStringList keys() const = 0; + virtual QStringList keys() const override = 0; - virtual QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) { return 0; } - virtual QSGRenderLoop *createWindowManager() { return 0; } + QQuickTextureFactory *createTextureFactoryFromImage(const QImage &) override { return 0; } + QSGRenderLoop *createWindowManager() override { return 0; } }; QT_END_NAMESPACE diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h index 0fefb95328..57dc4a5d07 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h @@ -72,10 +72,10 @@ public: QSGDefaultDistanceFieldGlyphCache(QSGDistanceFieldGlyphCacheManager *man, QOpenGLContext *c, const QRawFont &font); virtual ~QSGDefaultDistanceFieldGlyphCache(); - void requestGlyphs(const QSet<glyph_t> &glyphs); - void storeGlyphs(const QList<QDistanceField> &glyphs); - void referenceGlyphs(const QSet<glyph_t> &glyphs); - void releaseGlyphs(const QSet<glyph_t> &glyphs); + void requestGlyphs(const QSet<glyph_t> &glyphs) override; + void storeGlyphs(const QList<QDistanceField> &glyphs) override; + void referenceGlyphs(const QSet<glyph_t> &glyphs) override; + void releaseGlyphs(const QSet<glyph_t> &glyphs) override; bool useTextureResizeWorkaround() const; bool useTextureUploadWorkaround() const; diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h index caa7dfad07..b0a2788dd8 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h @@ -71,9 +71,9 @@ public: QSGTextMaskMaterial(const QRawFont &font, QFontEngine::GlyphFormat glyphFormat = QFontEngine::Format_None); virtual ~QSGTextMaskMaterial(); - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; - virtual int compare(const QSGMaterial *other) const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; + int compare(const QSGMaterial *other) const override; void setColor(const QColor &c) { m_color = QVector4D(c.redF(), c.greenF(), c.blueF(), c.alphaF()); } void setColor(const QVector4D &color) { m_color = color; } @@ -115,10 +115,10 @@ public: void setStyleColor(const QVector4D &color) { m_styleColor = color; } const QVector4D &styleColor() const { return m_styleColor; } - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; - int compare(const QSGMaterial *other) const; + int compare(const QSGMaterial *other) const override; private: QVector2D m_styleShift; @@ -131,8 +131,8 @@ public: QSGOutlinedTextMaterial(const QRawFont &font); ~QSGOutlinedTextMaterial() { } - QSGMaterialType *type() const; - QSGMaterialShader *createShader() const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; }; QT_END_NAMESPACE diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h index 22c68558ef..c0c6bda718 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h @@ -67,19 +67,19 @@ public: QSGDistanceFieldGlyphNode(QSGRenderContext *context); ~QSGDistanceFieldGlyphNode(); - virtual QPointF baseLine() const { return m_baseLine; } - virtual void setGlyphs(const QPointF &position, const QGlyphRun &glyphs); - virtual void setColor(const QColor &color); + QPointF baseLine() const override { return m_baseLine; } + void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override; + void setColor(const QColor &color) override; - virtual void setPreferredAntialiasingMode(AntialiasingMode mode); + void setPreferredAntialiasingMode(AntialiasingMode mode) override; - virtual void setStyle(QQuickText::TextStyle style); - virtual void setStyleColor(const QColor &color); + void setStyle(QQuickText::TextStyle style) override; + void setStyleColor(const QColor &color) override; - virtual void update(); - void preprocess(); + void update() override; + void preprocess() override; - void invalidateGlyphs(const QVector<quint32> &glyphs); + void invalidateGlyphs(const QVector<quint32> &glyphs) override; void updateGeometry(); diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h index 38dcf3d307..c13a0898eb 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h @@ -63,9 +63,9 @@ public: QSGDistanceFieldTextMaterial(); ~QSGDistanceFieldTextMaterial(); - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; - virtual int compare(const QSGMaterial *other) const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; + int compare(const QSGMaterial *other) const override; virtual void setColor(const QColor &color); const QVector4D &color() const { return m_color; } @@ -97,9 +97,9 @@ public: QSGDistanceFieldStyledTextMaterial(); ~QSGDistanceFieldStyledTextMaterial(); - virtual QSGMaterialType *type() const = 0; - virtual QSGMaterialShader *createShader() const = 0; - virtual int compare(const QSGMaterial *other) const; + QSGMaterialType *type() const override = 0; + QSGMaterialShader *createShader() const override = 0; + int compare(const QSGMaterial *other) const override; void setStyleColor(const QColor &color); const QVector4D &styleColor() const { return m_styleColor; } @@ -114,8 +114,8 @@ public: QSGDistanceFieldOutlineTextMaterial(); ~QSGDistanceFieldOutlineTextMaterial(); - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; }; class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldShiftedStyleTextMaterial : public QSGDistanceFieldStyledTextMaterial @@ -124,9 +124,9 @@ public: QSGDistanceFieldShiftedStyleTextMaterial(); ~QSGDistanceFieldShiftedStyleTextMaterial(); - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; - virtual int compare(const QSGMaterial *other) const; + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; + int compare(const QSGMaterial *other) const override; void setShift(const QPointF &shift) { m_shift = shift; } const QPointF &shift() const { return m_shift; } @@ -138,17 +138,17 @@ protected: class Q_QUICK_PRIVATE_EXPORT QSGHiQSubPixelDistanceFieldTextMaterial : public QSGDistanceFieldTextMaterial { public: - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; - void setColor(const QColor &color) { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; + void setColor(const QColor &color) override { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } }; class Q_QUICK_PRIVATE_EXPORT QSGLoQSubPixelDistanceFieldTextMaterial : public QSGDistanceFieldTextMaterial { public: - virtual QSGMaterialType *type() const; - virtual QSGMaterialShader *createShader() const; - void setColor(const QColor &color) { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } + QSGMaterialType *type() const override; + QSGMaterialShader *createShader() const override; + void setColor(const QColor &color) override { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } }; QT_END_NAMESPACE diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h index 0ab83b444a..32bfcb7148 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h +++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h @@ -68,29 +68,29 @@ public: QSGThreadedRenderLoop(); ~QSGThreadedRenderLoop(); - void show(QQuickWindow *) {} - void hide(QQuickWindow *); + void show(QQuickWindow *) override {} + void hide(QQuickWindow *) override; - void windowDestroyed(QQuickWindow *window); - void exposureChanged(QQuickWindow *window); + void windowDestroyed(QQuickWindow *window) override; + void exposureChanged(QQuickWindow *window) override; - QImage grab(QQuickWindow *); + QImage grab(QQuickWindow *) override; - void update(QQuickWindow *window); - void maybeUpdate(QQuickWindow *window); - void handleUpdateRequest(QQuickWindow *window); + void update(QQuickWindow *window) override; + void maybeUpdate(QQuickWindow *window) override; + void handleUpdateRequest(QQuickWindow *window) override; - QSGContext *sceneGraphContext() const; - QSGRenderContext *createRenderContext(QSGContext *) const; + QSGContext *sceneGraphContext() const override; + QSGRenderContext *createRenderContext(QSGContext *) const override; - QAnimationDriver *animationDriver() const; + QAnimationDriver *animationDriver() const override; - void releaseResources(QQuickWindow *window); + void releaseResources(QQuickWindow *window) override; - bool event(QEvent *); - void postJob(QQuickWindow *window, QRunnable *job); + bool event(QEvent *) override; + void postJob(QQuickWindow *window, QRunnable *job) override; - bool interleaveIncubation() const; + bool interleaveIncubation() const override; public Q_SLOTS: void animationStarted(); diff --git a/src/quick/scenegraph/qsgwindowsrenderloop_p.h b/src/quick/scenegraph/qsgwindowsrenderloop_p.h index 9e5d7f04d3..1940a66af2 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop_p.h +++ b/src/quick/scenegraph/qsgwindowsrenderloop_p.h @@ -70,31 +70,31 @@ public: explicit QSGWindowsRenderLoop(); ~QSGWindowsRenderLoop(); - void show(QQuickWindow *window); - void hide(QQuickWindow *window); + void show(QQuickWindow *window) override; + void hide(QQuickWindow *window) override; - void windowDestroyed(QQuickWindow *window); + void windowDestroyed(QQuickWindow *window) override; - void exposureChanged(QQuickWindow *window); - QImage grab(QQuickWindow *window); + void exposureChanged(QQuickWindow *window) override; + QImage grab(QQuickWindow *window) override; - void update(QQuickWindow *window); - void maybeUpdate(QQuickWindow *window); + void update(QQuickWindow *window) override; + void maybeUpdate(QQuickWindow *window) override; - QAnimationDriver *animationDriver() const { return m_animationDriver; } + QAnimationDriver *animationDriver() const override { return m_animationDriver; } - QSGContext *sceneGraphContext() const { return m_sg; } - QSGRenderContext *createRenderContext(QSGContext *) const; + QSGContext *sceneGraphContext() const override { return m_sg; } + QSGRenderContext *createRenderContext(QSGContext *) const override; - void releaseResources(QQuickWindow *) { } + void releaseResources(QQuickWindow *) override { } void render(); void renderWindow(QQuickWindow *window); - bool event(QEvent *event); + bool event(QEvent *event) override; bool anyoneShowing() const; - bool interleaveIncubation() const; + bool interleaveIncubation() const override; public Q_SLOTS: void started(); diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h index 01f98767fd..c14ba506ec 100644 --- a/src/quick/scenegraph/util/qsgsimplematerial.h +++ b/src/quick/scenegraph/util/qsgsimplematerial.h @@ -48,7 +48,7 @@ template <typename State> class QSGSimpleMaterialShader : public QSGMaterialShader { public: - void initialize() { + void initialize() override { QSGMaterialShader::initialize(); #ifndef QT_NO_OPENGL m_id_matrix = program()->uniformLocation(uniformMatrixName()); @@ -74,7 +74,7 @@ public: const char *uniformMatrixName() const { return "qt_Matrix"; } const char *uniformOpacityName() const { return "qt_Opacity"; } - void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); + void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; virtual void updateState(const State *newState, const State *oldState) = 0; @@ -82,7 +82,7 @@ public: virtual QList<QByteArray> attributes() const = 0; - char const *const *attributeNames() const + char const *const *attributeNames() const override { if (m_attribute_pointers.size()) return m_attribute_pointers.constData(); |