From 213b8908993ce39587ca7e8c90ede4c21c2af554 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 30 Jun 2021 11:31:03 +0200 Subject: Add missing "override" keywords Our examples should follow best practices. Change-Id: Ice90a818ae46e921b421e8d297806d8f7200294b Reviewed-by: Fabian Kosmale Reviewed-by: Andrei Golubev --- examples/qml/tutorials/extending-qml/chapter1-basics/piechart.h | 2 +- examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h | 2 +- examples/qml/tutorials/extending-qml/chapter3-bindings/piechart.h | 2 +- .../qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h | 2 +- examples/qml/tutorials/extending-qml/chapter5-listproperties/pieslice.h | 2 +- examples/qml/tutorials/extending-qml/chapter6-plugins/import/pieslice.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/qml') diff --git a/examples/qml/tutorials/extending-qml/chapter1-basics/piechart.h b/examples/qml/tutorials/extending-qml/chapter1-basics/piechart.h index b2a0f60893..b02075cff7 100644 --- a/examples/qml/tutorials/extending-qml/chapter1-basics/piechart.h +++ b/examples/qml/tutorials/extending-qml/chapter1-basics/piechart.h @@ -70,7 +70,7 @@ public: QColor color() const; void setColor(const QColor &color); - void paint(QPainter *painter); + void paint(QPainter *painter) override; private: QString m_name; diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h b/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h index ca5bede67f..e81e012d5e 100644 --- a/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h +++ b/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h @@ -73,7 +73,7 @@ public: QColor color() const; void setColor(const QColor &color); - void paint(QPainter *painter); + void paint(QPainter *painter) override; //![2] Q_INVOKABLE void clearChart(); diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/piechart.h b/examples/qml/tutorials/extending-qml/chapter3-bindings/piechart.h index 5ff895b6b6..d4af6cc5a7 100644 --- a/examples/qml/tutorials/extending-qml/chapter3-bindings/piechart.h +++ b/examples/qml/tutorials/extending-qml/chapter3-bindings/piechart.h @@ -74,7 +74,7 @@ public: QColor color() const; void setColor(const QColor &color); - void paint(QPainter *painter); + void paint(QPainter *painter) override; Q_INVOKABLE void clearChart(); diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h index 9f8a66734b..af8546f00d 100644 --- a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h +++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/pieslice.h @@ -66,7 +66,7 @@ public: QColor color() const; void setColor(const QColor &color); - void paint(QPainter *painter); + void paint(QPainter *painter) override; private: QColor m_color; diff --git a/examples/qml/tutorials/extending-qml/chapter5-listproperties/pieslice.h b/examples/qml/tutorials/extending-qml/chapter5-listproperties/pieslice.h index 89f23ea8a8..b088bd3afe 100644 --- a/examples/qml/tutorials/extending-qml/chapter5-listproperties/pieslice.h +++ b/examples/qml/tutorials/extending-qml/chapter5-listproperties/pieslice.h @@ -75,7 +75,7 @@ public: int angleSpan() const; void setAngleSpan(int span); - void paint(QPainter *painter); + void paint(QPainter *painter) override; private: QColor m_color; diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/pieslice.h b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/pieslice.h index c8c02a839a..86602afe8f 100644 --- a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/pieslice.h +++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/pieslice.h @@ -73,7 +73,7 @@ public: int angleSpan() const; void setAngleSpan(int span); - void paint(QPainter *painter); + void paint(QPainter *painter) override; private: QColor m_color; -- cgit v1.2.3