@@ -38,9 +38,9 @@ Item {
39 Number of rating stars.
39 Number of rating stars.
41− property int starCount: 5
41+ property int starsCount: 5
43− readonly property int effectiveRating: MathUtils.clamp(starCount * rating / maximumRating, 0, maximumRating)
43+ readonly property int effectiveRating: MathUtils.clamp(starsCount * rating / maximumRating, 0, maximumRating)
@@ -51,9 +51,9 @@ Item {
51 Repeater {
51 Repeater {
52 id: repeater
52 id: repeater
54− property int averageDelegateWidth: row.width / root.starCount
54+ property int averageDelegateWidth: row.width / root.starsCount
56− model: root.starCount
56+ model: root.starsCount
59 objectName: "ratingStar" + index
59 objectName: "ratingStar" + index
@@ -65,6 +65,6 @@ Item {
65 MouseArea {
65 MouseArea {
66 anchors.fill: row
66 anchors.fill: row
67 enabled: root.interactive
67 enabled: root.interactive
68− onClicked: root.rating = Math.ceil((mouse.x / repeater.averageDelegateWidth)) * root.maximumRating / root.starCount
68+ onClicked: root.rating = Math.ceil(mouse.x / repeater.averageDelegateWidth) * root.maximumRating / root.starsCount