Skip to content

Commit c86371e

Browse files
committed
Fix some warnings from QtCreator
1 parent bba7f01 commit c86371e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

blacknotes.qml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ MuseScore {
3939
}
4040

4141
function blackenElement(element) {
42-
if (element.type == Element.REST)
42+
if (element.type === Element.REST)
4343
element.color = "black"
44-
else if (element.type == Element.CHORD) {
44+
else if (element.type === Element.CHORD) {
4545
if (element.stem)
4646
element.stem.color = "black"
4747
if (element.hook)
@@ -51,7 +51,7 @@ MuseScore {
5151
if (element.stemSlash)
5252
element.stemSlash.color = "black"
5353
}
54-
else if (element.type == Element.NOTE) {
54+
else if (element.type === Element.NOTE) {
5555
element.color = "black"
5656
if (element.accidental)
5757
element.accidental.color = "black"
@@ -81,7 +81,7 @@ MuseScore {
8181
else {
8282
startStaff = cursor.staffIdx;
8383
cursor.rewind(2)
84-
if (cursor.tick == 0) {
84+
if (cursor.tick === 0) {
8585
// this happens when the selection includes
8686
// the last measure of the score.
8787
// rewind(2) goes behind the last segment (where
@@ -103,21 +103,21 @@ MuseScore {
103103

104104
while (cursor.segment && (fullScore || cursor.tick < endTick)) {
105105
if (cursor.element) {
106-
if (cursor.element.type == Element.REST)
106+
if (cursor.element.type === Element.REST)
107107
func(cursor.element)
108-
else if (cursor.element.type == Element.CHORD) {
108+
else if (cursor.element.type === Element.CHORD) {
109109
func(cursor.element)
110110
var graceChords = cursor.element.graceNotes;
111111
for (var i = 0; i < graceChords.length; i++) {
112112
// iterate through all grace chords
113113
func(graceChords[i])
114-
var notes = graceChords[i].notes
114+
var gnotes = graceChords[i].notes
115115
for (var j = 0; j < graceChords[i].notes.length; j++)
116-
func(graceChords[i].notes[j])
116+
func(graceChords[i].gnotes[j])
117117
}
118118
var notes = cursor.element.notes
119-
for (var i = 0; i < notes.length; i++) {
120-
var note = notes[i]
119+
for (var k = 0; k < notes.length; k++) {
120+
var note = notes[k]
121121
func(note)
122122
}
123123
}

0 commit comments

Comments
 (0)