diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-30 11:31:03 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-30 14:17:01 +0200 |
commit | 213b8908993ce39587ca7e8c90ede4c21c2af554 (patch) | |
tree | 62e5023089e274e5d3fa19b0276d7fe8f21fc1b3 /examples/qml | |
parent | b200fbe213adf2859ddebefac0be60b04389a8a6 (diff) |
Add missing "override" keywords
Our examples should follow best practices.
Change-Id: Ice90a818ae46e921b421e8d297806d8f7200294b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'examples/qml')
6 files changed, 6 insertions, 6 deletions
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; |