aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h
diff options
context:
space:
mode:
authorSemih Yavuz <semih.yavuz@qt.io>2022-11-07 11:28:37 +0100
committerSemih Yavuz <semih.yavuz@qt.io>2022-11-07 18:15:57 +0100
commit826cf9bb808999d9b49f8ad53b80a902e8fd7bda (patch)
tree8985475efaba5baac83f6cdd75308370e8c1c625 /examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h
parentc7c4c8f088b2c390aaf2e87357d8a1f604ebcdf9 (diff)
QmlExamples: Add missing dependencies of QtQuick in CMakeLists
Running qmllint on extending-qml examples raises a plenty of warnings due to a missing dependency declaration to QtQuick. Simply add it. Also add FINAL to all properties exposed from C++ to disable (possible) property shadowings. Pick-to: 6.4 6.2 Fixes: QTBUG-106602 Change-Id: I7b12a804f8f3ca64bd8f2f312a9e53dfe02b0a4c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h b/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h
index 07eb48ceda..d1eb5f1359 100644
--- a/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h
+++ b/examples/qml/tutorials/extending-qml/chapter2-methods/piechart.h
@@ -11,8 +11,8 @@ class PieChart : public QQuickPaintedItem
{
//![0]
Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString name READ name WRITE setName FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
QML_ELEMENT
//![1]
public: