Skip to content

Commit 8c272c7

Browse files
committed
Fix some qmllint warnings
1 parent 2937faa commit 8c272c7

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/preferences/qml/MuseScore/Preferences/AccentColorsList.qml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* You should have received a copy of the GNU General Public License
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
22+
pragma ComponentBehavior: Bound
23+
2224
import QtQuick 2.15
2325

2426
import Muse.Ui 1.0
@@ -37,7 +39,7 @@ RadioButtonGroup {
3739

3840
onNavigationEvent: function(event) {
3941
if (event.type === NavigationEvent.AboutActive) {
40-
event.setData("controlIndex", [navigationRow, navigationColumnStart + root.currentIndex])
42+
event.setData("controlIndex", [root.navigationRow, root.navigationColumnStart + root.currentIndex])
4143
}
4244
}
4345
}
@@ -58,21 +60,23 @@ RadioButtonGroup {
5860
delegate: RoundedRadioButton {
5961
id: button
6062

63+
required property int index
64+
required property var modelData
65+
readonly property color accentColor: modelData
66+
6167
width: root.totalSampleSize
6268
height: width
6369

64-
checked: root.currentIndex === model.index
65-
66-
property color accentColor: modelData
70+
checked: root.currentIndex === index
6771

6872
navigation.name: "AccentColourButton"
6973
navigation.panel: root.navigationPanel
7074
navigation.row: root.navigationRow
71-
navigation.column: root.navigationColumnStart + model.index
75+
navigation.column: root.navigationColumnStart + index
7276
navigation.accessible.name: Utils.accessibleColorDescription(accentColor)
7377

7478
onToggled: {
75-
root.accentColorChangeRequested(model.index)
79+
root.accentColorChangeRequested(index)
7680
}
7781

7882
indicator: Rectangle {
@@ -99,6 +103,6 @@ RadioButtonGroup {
99103
}
100104
}
101105

102-
background: Item {}
106+
background: null
103107
}
104108
}

src/preferences/qml/MuseScore/Preferences/AdvancedPreferencesPage.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* You should have received a copy of the GNU General Public License
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
22+
pragma ComponentBehavior: Bound
23+
2224
import QtQuick 2.15
2325
import QtQuick.Layouts 1.15
2426

src/preferences/qml/MuseScore/Preferences/PercussionPreferencesPage.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
2222

23+
pragma ComponentBehavior: Bound
24+
2325
import QtQuick 2.15
2426

2527
import Muse.Ui 1.0
@@ -81,6 +83,8 @@ PreferencesPage {
8183
model: percussionPreferencesModel.autoShowModes
8284

8385
delegate: RoundedRadioButton {
86+
required property var modelData
87+
8488
width: ListView.view?.width ?? 0
8589

8690
text: modelData.title

0 commit comments

Comments
 (0)